@kousaku-maron/diffshape 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var zf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qm={exports:{}},Tl={},Km={exports:{}},Fe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Uo=Symbol.for("react.element"),Nw=Symbol.for("react.portal"),jw=Symbol.for("react.fragment"),_w=Symbol.for("react.strict_mode"),$w=Symbol.for("react.profiler"),Tw=Symbol.for("react.provider"),Lw=Symbol.for("react.context"),Iw=Symbol.for("react.forward_ref"),Aw=Symbol.for("react.suspense"),Rw=Symbol.for("react.memo"),Ow=Symbol.for("react.lazy"),Bf=Symbol.iterator;function Mw(e){return e===null||typeof e!="object"?null:(e=Bf&&e[Bf]||e["@@iterator"],typeof e=="function"?e:null)}var Gm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ym=Object.assign,Xm={};function Ti(e,t,n){this.props=e,this.context=t,this.refs=Xm,this.updater=n||Gm}Ti.prototype.isReactComponent={};Ti.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ti.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qm(){}Qm.prototype=Ti.prototype;function Bc(e,t,n){this.props=e,this.context=t,this.refs=Xm,this.updater=n||Gm}var Uc=Bc.prototype=new Qm;Uc.constructor=Bc;Ym(Uc,Ti.prototype);Uc.isPureReactComponent=!0;var Uf=Array.isArray,Zm=Object.prototype.hasOwnProperty,Hc={current:null},Jm={key:!0,ref:!0,__self:!0,__source:!0};function eg(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Zm.call(t,r)&&!Jm.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Uo,type:e,key:o,ref:s,props:i,_owner:Hc.current}}function Pw(e,t){return{$$typeof:Uo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Wc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Uo}function Fw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Hf=/\/+/g;function aa(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Fw(""+e.key):t.toString(36)}function $s(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Uo:case Nw:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+aa(s,0):r,Uf(i)?(n="",e!=null&&(n=e.replace(Hf,"$&/")+"/"),$s(i,t,n,"",function(u){return u})):i!=null&&(Wc(i)&&(i=Pw(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Hf,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",Uf(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+aa(o,l);s+=$s(o,t,n,a,i)}else if(a=Mw(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+aa(o,l++),s+=$s(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function es(e,t,n){if(e==null)return e;var r=[],i=0;return $s(e,r,"","",function(o){return t.call(n,o,i++)}),r}function Dw(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var At={current:null},Ts={transition:null},zw={ReactCurrentDispatcher:At,ReactCurrentBatchConfig:Ts,ReactCurrentOwner:Hc};function tg(){throw Error("act(...) is not supported in production builds of React.")}Fe.Children={map:es,forEach:function(e,t,n){es(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return es(e,function(){t++}),t},toArray:function(e){return es(e,function(t){return t})||[]},only:function(e){if(!Wc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Fe.Component=Ti;Fe.Fragment=jw;Fe.Profiler=$w;Fe.PureComponent=Bc;Fe.StrictMode=_w;Fe.Suspense=Aw;Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zw;Fe.act=tg;Fe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ym({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Hc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Zm.call(t,a)&&!Jm.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Uo,type:e.type,key:i,ref:o,props:r,_owner:s}};Fe.createContext=function(e){return e={$$typeof:Lw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Tw,_context:e},e.Consumer=e};Fe.createElement=eg;Fe.createFactory=function(e){var t=eg.bind(null,e);return t.type=e,t};Fe.createRef=function(){return{current:null}};Fe.forwardRef=function(e){return{$$typeof:Iw,render:e}};Fe.isValidElement=Wc;Fe.lazy=function(e){return{$$typeof:Ow,_payload:{_status:-1,_result:e},_init:Dw}};Fe.memo=function(e,t){return{$$typeof:Rw,type:e,compare:t===void 0?null:t}};Fe.startTransition=function(e){var t=Ts.transition;Ts.transition={};try{e()}finally{Ts.transition=t}};Fe.unstable_act=tg;Fe.useCallback=function(e,t){return At.current.useCallback(e,t)};Fe.useContext=function(e){return At.current.useContext(e)};Fe.useDebugValue=function(){};Fe.useDeferredValue=function(e){return At.current.useDeferredValue(e)};Fe.useEffect=function(e,t){return At.current.useEffect(e,t)};Fe.useId=function(){return At.current.useId()};Fe.useImperativeHandle=function(e,t,n){return At.current.useImperativeHandle(e,t,n)};Fe.useInsertionEffect=function(e,t){return At.current.useInsertionEffect(e,t)};Fe.useLayoutEffect=function(e,t){return At.current.useLayoutEffect(e,t)};Fe.useMemo=function(e,t){return At.current.useMemo(e,t)};Fe.useReducer=function(e,t,n){return At.current.useReducer(e,t,n)};Fe.useRef=function(e){return At.current.useRef(e)};Fe.useState=function(e){return At.current.useState(e)};Fe.useSyncExternalStore=function(e,t,n){return At.current.useSyncExternalStore(e,t,n)};Fe.useTransition=function(){return At.current.useTransition()};Fe.version="18.3.1";Km.exports=Fe;var T=Km.exports;/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Bw=T,Uw=Symbol.for("react.element"),Hw=Symbol.for("react.fragment"),Ww=Object.prototype.hasOwnProperty,Vw=Bw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,qw={key:!0,ref:!0,__self:!0,__source:!0};function ng(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Ww.call(t,r)&&!qw.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Uw,type:e,key:o,ref:s,props:i,_owner:Vw.current}}Tl.Fragment=Hw;Tl.jsx=ng;Tl.jsxs=ng;qm.exports=Tl;var f=qm.exports,rg={exports:{}},Xt={},ig={exports:{}},og={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(z,U){var b=z.length;z.push(U);e:for(;0<b;){var Q=b-1>>>1,H=z[Q];if(0<i(H,U))z[Q]=U,z[b]=H,b=Q;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var U=z[0],b=z.pop();if(b!==U){z[0]=b;e:for(var Q=0,H=z.length,j=H>>>1;Q<j;){var P=2*(Q+1)-1,L=z[P],F=P+1,K=z[F];if(0>i(L,b))F<H&&0>i(K,L)?(z[Q]=K,z[F]=b,Q=F):(z[Q]=L,z[P]=b,Q=P);else if(F<H&&0>i(K,b))z[Q]=K,z[F]=b,Q=F;else break e}}return U}function i(z,U){var b=z.sortIndex-U.sortIndex;return b!==0?b:z.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,h=3,p=!1,y=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(z){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=z)r(u),U.sortIndex=U.expirationTime,t(a,U);else break;U=n(u)}}function w(z){if(x=!1,g(z),!y)if(n(a)!==null)y=!0,B($);else{var U=n(u);U!==null&&V(w,U.startTime-z)}}function $(z,U){y=!1,x&&(x=!1,v(N),N=-1),p=!0;var b=h;try{for(g(U),d=n(a);d!==null&&(!(d.expirationTime>U)||z&&!O());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,h=d.priorityLevel;var H=Q(d.expirationTime<=U);U=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(a)&&r(a),g(U)}else r(a);d=n(a)}if(d!==null)var j=!0;else{var P=n(u);P!==null&&V(w,P.startTime-U),j=!1}return j}finally{d=null,h=b,p=!1}}var k=!1,_=null,N=-1,D=5,E=-1;function O(){return!(e.unstable_now()-E<D)}function C(){if(_!==null){var z=e.unstable_now();E=z;var U=!0;try{U=_(!0,z)}finally{U?A():(k=!1,_=null)}}else k=!1}var A;if(typeof m=="function")A=function(){m(C)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,q=R.port2;R.port1.onmessage=C,A=function(){q.postMessage(null)}}else A=function(){S(C,0)};function B(z){_=z,k||(k=!0,A())}function V(z,U){N=S(function(){z(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_continueExecution=function(){y||p||(y=!0,B($))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(z){switch(h){case 1:case 2:case 3:var U=3;break;default:U=h}var b=h;h=U;try{return z()}finally{h=b}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,U){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var b=h;h=z;try{return U()}finally{h=b}},e.unstable_scheduleCallback=function(z,U,b){var Q=e.unstable_now();switch(typeof b=="object"&&b!==null?(b=b.delay,b=typeof b=="number"&&0<b?Q+b:Q):b=Q,z){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=b+H,z={id:c++,callback:U,priorityLevel:z,startTime:b,expirationTime:H,sortIndex:-1},b>Q?(z.sortIndex=b,t(u,z),n(a)===null&&z===n(u)&&(x?(v(N),N=-1):x=!0,V(w,b-Q))):(z.sortIndex=H,t(a,z),y||p||(y=!0,B($))),z},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(z){var U=h;return function(){var b=h;h=U;try{return z.apply(this,arguments)}finally{h=b}}}})(og);ig.exports=og;var Kw=ig.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Gw=T,Gt=Kw;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sg=new Set,vo={};function Wr(e,t){wi(e,t),wi(e+"Capture",t)}function wi(e,t){for(vo[e]=t,e=0;e<t.length;e++)sg.add(t[e])}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yu=Object.prototype.hasOwnProperty,Yw=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Wf={},Vf={};function Xw(e){return yu.call(Vf,e)?!0:yu.call(Wf,e)?!1:Yw.test(e)?Vf[e]=!0:(Wf[e]=!0,!1)}function Qw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Zw(e,t,n,r){if(t===null||typeof t>"u"||Qw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Rt(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new Rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new Rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new Rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new Rt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){bt[e]=new Rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new Rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new Rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new Rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new Rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Vc=/[\-:]([a-z])/g;function qc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Vc,qc);bt[t]=new Rt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Vc,qc);bt[t]=new Rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Vc,qc);bt[t]=new Rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Kc(e,t,n,r){var i=bt.hasOwnProperty(t)?bt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Zw(t,n,i,r)&&(n=null),r||i===null?Xw(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var qn=Gw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ts=Symbol.for("react.element"),ei=Symbol.for("react.portal"),ti=Symbol.for("react.fragment"),Gc=Symbol.for("react.strict_mode"),vu=Symbol.for("react.profiler"),lg=Symbol.for("react.provider"),ag=Symbol.for("react.context"),Yc=Symbol.for("react.forward_ref"),xu=Symbol.for("react.suspense"),wu=Symbol.for("react.suspense_list"),Xc=Symbol.for("react.memo"),Xn=Symbol.for("react.lazy"),ug=Symbol.for("react.offscreen"),qf=Symbol.iterator;function Fi(e){return e===null||typeof e!="object"?null:(e=qf&&e[qf]||e["@@iterator"],typeof e=="function"?e:null)}var tt=Object.assign,ua;function Xi(e){if(ua===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ua=t&&t[1]||""}return`
|
|
34
|
+
`+ua+e}var ca=!1;function da(e,t){if(!e||ca)return"";ca=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
+
`),o=r.stack.split(`
|
|
36
|
+
`),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
|
|
37
|
+
`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{ca=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xi(e):""}function Jw(e){switch(e.tag){case 5:return Xi(e.type);case 16:return Xi("Lazy");case 13:return Xi("Suspense");case 19:return Xi("SuspenseList");case 0:case 2:case 15:return e=da(e.type,!1),e;case 11:return e=da(e.type.render,!1),e;case 1:return e=da(e.type,!0),e;default:return""}}function ku(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ti:return"Fragment";case ei:return"Portal";case vu:return"Profiler";case Gc:return"StrictMode";case xu:return"Suspense";case wu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ag:return(e.displayName||"Context")+".Consumer";case lg:return(e._context.displayName||"Context")+".Provider";case Yc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xc:return t=e.displayName||null,t!==null?t:ku(e.type)||"Memo";case Xn:t=e._payload,e=e._init;try{return ku(e(t))}catch{}}return null}function ek(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ku(t);case 8:return t===Gc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tk(e){var t=cg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ns(e){e._valueTracker||(e._valueTracker=tk(e))}function dg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=cg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function qs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bu(e,t){var n=t.checked;return tt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function fg(e,t){t=t.checked,t!=null&&Kc(e,"checked",t,!1)}function Eu(e,t){fg(e,t);var n=fr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Su(e,t.type,n):t.hasOwnProperty("defaultValue")&&Su(e,t.type,fr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Su(e,t,n){(t!=="number"||qs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qi=Array.isArray;function pi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Cu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(le(91));return tt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(le(92));if(Qi(n)){if(1<n.length)throw Error(le(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fr(n)}}function pg(e,t){var n=fr(t.value),r=fr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Xf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var rs,mg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(rs=rs||document.createElement("div"),rs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=rs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var to={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nk=["Webkit","ms","Moz","O"];Object.keys(to).forEach(function(e){nk.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),to[t]=to[e]})});function gg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||to.hasOwnProperty(e)&&to[e]?(""+t).trim():t+"px"}function yg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=gg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var rk=tt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ju(e,t){if(t){if(rk[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(le(62))}}function _u(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $u=null;function Qc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tu=null,hi=null,mi=null;function Qf(e){if(e=Vo(e)){if(typeof Tu!="function")throw Error(le(280));var t=e.stateNode;t&&(t=Ol(t),Tu(e.stateNode,e.type,t))}}function vg(e){hi?mi?mi.push(e):mi=[e]:hi=e}function xg(){if(hi){var e=hi,t=mi;if(mi=hi=null,Qf(e),t)for(e=0;e<t.length;e++)Qf(t[e])}}function wg(e,t){return e(t)}function kg(){}var fa=!1;function bg(e,t,n){if(fa)return e(t,n);fa=!0;try{return wg(e,t,n)}finally{fa=!1,(hi!==null||mi!==null)&&(kg(),xg())}}function wo(e,t){var n=e.stateNode;if(n===null)return null;var r=Ol(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(le(231,t,typeof n));return n}var Lu=!1;if(Bn)try{var Di={};Object.defineProperty(Di,"passive",{get:function(){Lu=!0}}),window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{Lu=!1}function ik(e,t,n,r,i,o,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var no=!1,Ks=null,Gs=!1,Iu=null,ok={onError:function(e){no=!0,Ks=e}};function sk(e,t,n,r,i,o,s,l,a){no=!1,Ks=null,ik.apply(ok,arguments)}function lk(e,t,n,r,i,o,s,l,a){if(sk.apply(this,arguments),no){if(no){var u=Ks;no=!1,Ks=null}else throw Error(le(198));Gs||(Gs=!0,Iu=u)}}function Vr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Eg(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Zf(e){if(Vr(e)!==e)throw Error(le(188))}function ak(e){var t=e.alternate;if(!t){if(t=Vr(e),t===null)throw Error(le(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Zf(i),e;if(o===r)return Zf(i),t;o=o.sibling}throw Error(le(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(le(189))}}if(n.alternate!==r)throw Error(le(190))}if(n.tag!==3)throw Error(le(188));return n.stateNode.current===n?e:t}function Sg(e){return e=ak(e),e!==null?Cg(e):null}function Cg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Cg(e);if(t!==null)return t;e=e.sibling}return null}var Ng=Gt.unstable_scheduleCallback,Jf=Gt.unstable_cancelCallback,uk=Gt.unstable_shouldYield,ck=Gt.unstable_requestPaint,it=Gt.unstable_now,dk=Gt.unstable_getCurrentPriorityLevel,Zc=Gt.unstable_ImmediatePriority,jg=Gt.unstable_UserBlockingPriority,Ys=Gt.unstable_NormalPriority,fk=Gt.unstable_LowPriority,_g=Gt.unstable_IdlePriority,Ll=null,Tn=null;function pk(e){if(Tn&&typeof Tn.onCommitFiberRoot=="function")try{Tn.onCommitFiberRoot(Ll,e,void 0,(e.current.flags&128)===128)}catch{}}var xn=Math.clz32?Math.clz32:gk,hk=Math.log,mk=Math.LN2;function gk(e){return e>>>=0,e===0?32:31-(hk(e)/mk|0)|0}var is=64,os=4194304;function Zi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Zi(l):(o&=s,o!==0&&(r=Zi(o)))}else s=n&~i,s!==0?r=Zi(s):o!==0&&(r=Zi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-xn(t),i=1<<n,r|=e[n],t&=~i;return r}function yk(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vk(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-xn(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=yk(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function Au(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $g(){var e=is;return is<<=1,!(is&4194240)&&(is=64),e}function pa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ho(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xn(t),e[t]=n}function xk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-xn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Jc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var He=0;function Tg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Lg,ed,Ig,Ag,Rg,Ru=!1,ss=[],rr=null,ir=null,or=null,ko=new Map,bo=new Map,Zn=[],wk="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ep(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":or=null;break;case"pointerover":case"pointerout":ko.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bo.delete(t.pointerId)}}function zi(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Vo(t),t!==null&&ed(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kk(e,t,n,r,i){switch(t){case"focusin":return rr=zi(rr,e,t,n,r,i),!0;case"dragenter":return ir=zi(ir,e,t,n,r,i),!0;case"mouseover":return or=zi(or,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ko.set(o,zi(ko.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,bo.set(o,zi(bo.get(o)||null,e,t,n,r,i)),!0}return!1}function Og(e){var t=Nr(e.target);if(t!==null){var n=Vr(t);if(n!==null){if(t=n.tag,t===13){if(t=Eg(n),t!==null){e.blockedOn=t,Rg(e.priority,function(){Ig(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ls(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ou(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$u=r,n.target.dispatchEvent(r),$u=null}else return t=Vo(n),t!==null&&ed(t),e.blockedOn=n,!1;t.shift()}return!0}function tp(e,t,n){Ls(e)&&n.delete(t)}function bk(){Ru=!1,rr!==null&&Ls(rr)&&(rr=null),ir!==null&&Ls(ir)&&(ir=null),or!==null&&Ls(or)&&(or=null),ko.forEach(tp),bo.forEach(tp)}function Bi(e,t){e.blockedOn===t&&(e.blockedOn=null,Ru||(Ru=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,bk)))}function Eo(e){function t(i){return Bi(i,e)}if(0<ss.length){Bi(ss[0],e);for(var n=1;n<ss.length;n++){var r=ss[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rr!==null&&Bi(rr,e),ir!==null&&Bi(ir,e),or!==null&&Bi(or,e),ko.forEach(t),bo.forEach(t),n=0;n<Zn.length;n++)r=Zn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Zn.length&&(n=Zn[0],n.blockedOn===null);)Og(n),n.blockedOn===null&&Zn.shift()}var gi=qn.ReactCurrentBatchConfig,Qs=!0;function Ek(e,t,n,r){var i=He,o=gi.transition;gi.transition=null;try{He=1,td(e,t,n,r)}finally{He=i,gi.transition=o}}function Sk(e,t,n,r){var i=He,o=gi.transition;gi.transition=null;try{He=4,td(e,t,n,r)}finally{He=i,gi.transition=o}}function td(e,t,n,r){if(Qs){var i=Ou(e,t,n,r);if(i===null)Ea(e,t,r,Zs,n),ep(e,r);else if(kk(i,e,t,n,r))r.stopPropagation();else if(ep(e,r),t&4&&-1<wk.indexOf(e)){for(;i!==null;){var o=Vo(i);if(o!==null&&Lg(o),o=Ou(e,t,n,r),o===null&&Ea(e,t,r,Zs,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Ea(e,t,r,null,n)}}var Zs=null;function Ou(e,t,n,r){if(Zs=null,e=Qc(r),e=Nr(e),e!==null)if(t=Vr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Eg(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zs=e,null}function Mg(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(dk()){case Zc:return 1;case jg:return 4;case Ys:case fk:return 16;case _g:return 536870912;default:return 16}default:return 16}}var tr=null,nd=null,Is=null;function Pg(){if(Is)return Is;var e,t=nd,n=t.length,r,i="value"in tr?tr.value:tr.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Is=i.slice(e,1<r?1-r:void 0)}function As(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ls(){return!0}function np(){return!1}function Qt(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ls:np,this.isPropagationStopped=np,this}return tt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ls)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ls)},persist:function(){},isPersistent:ls}),t}var Li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rd=Qt(Li),Wo=tt({},Li,{view:0,detail:0}),Ck=Qt(Wo),ha,ma,Ui,Il=tt({},Wo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:id,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ui&&(Ui&&e.type==="mousemove"?(ha=e.screenX-Ui.screenX,ma=e.screenY-Ui.screenY):ma=ha=0,Ui=e),ha)},movementY:function(e){return"movementY"in e?e.movementY:ma}}),rp=Qt(Il),Nk=tt({},Il,{dataTransfer:0}),jk=Qt(Nk),_k=tt({},Wo,{relatedTarget:0}),ga=Qt(_k),$k=tt({},Li,{animationName:0,elapsedTime:0,pseudoElement:0}),Tk=Qt($k),Lk=tt({},Li,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ik=Qt(Lk),Ak=tt({},Li,{data:0}),ip=Qt(Ak),Rk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ok={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Mk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mk[e])?!!t[e]:!1}function id(){return Pk}var Fk=tt({},Wo,{key:function(e){if(e.key){var t=Rk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=As(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ok[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:id,charCode:function(e){return e.type==="keypress"?As(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?As(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Dk=Qt(Fk),zk=tt({},Il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),op=Qt(zk),Bk=tt({},Wo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:id}),Uk=Qt(Bk),Hk=tt({},Li,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wk=Qt(Hk),Vk=tt({},Il,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),qk=Qt(Vk),Kk=[9,13,27,32],od=Bn&&"CompositionEvent"in window,ro=null;Bn&&"documentMode"in document&&(ro=document.documentMode);var Gk=Bn&&"TextEvent"in window&&!ro,Fg=Bn&&(!od||ro&&8<ro&&11>=ro),sp=" ",lp=!1;function Dg(e,t){switch(e){case"keyup":return Kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function Yk(e,t){switch(e){case"compositionend":return zg(t);case"keypress":return t.which!==32?null:(lp=!0,sp);case"textInput":return e=t.data,e===sp&&lp?null:e;default:return null}}function Xk(e,t){if(ni)return e==="compositionend"||!od&&Dg(e,t)?(e=Pg(),Is=nd=tr=null,ni=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Fg&&t.locale!=="ko"?null:t.data;default:return null}}var Qk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ap(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qk[e.type]:t==="textarea"}function Bg(e,t,n,r){vg(r),t=Js(t,"onChange"),0<t.length&&(n=new rd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var io=null,So=null;function Zk(e){Zg(e,0)}function Al(e){var t=oi(e);if(dg(t))return e}function Jk(e,t){if(e==="change")return t}var Ug=!1;if(Bn){var ya;if(Bn){var va="oninput"in document;if(!va){var up=document.createElement("div");up.setAttribute("oninput","return;"),va=typeof up.oninput=="function"}ya=va}else ya=!1;Ug=ya&&(!document.documentMode||9<document.documentMode)}function cp(){io&&(io.detachEvent("onpropertychange",Hg),So=io=null)}function Hg(e){if(e.propertyName==="value"&&Al(So)){var t=[];Bg(t,So,e,Qc(e)),bg(Zk,t)}}function e0(e,t,n){e==="focusin"?(cp(),io=t,So=n,io.attachEvent("onpropertychange",Hg)):e==="focusout"&&cp()}function t0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Al(So)}function n0(e,t){if(e==="click")return Al(t)}function r0(e,t){if(e==="input"||e==="change")return Al(t)}function i0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:i0;function Co(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!yu.call(t,i)||!En(e[i],t[i]))return!1}return!0}function dp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fp(e,t){var n=dp(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=dp(n)}}function Wg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vg(){for(var e=window,t=qs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qs(e.document)}return t}function sd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function o0(e){var t=Vg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Wg(n.ownerDocument.documentElement,n)){if(r!==null&&sd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=fp(n,o);var s=fp(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var s0=Bn&&"documentMode"in document&&11>=document.documentMode,ri=null,Mu=null,oo=null,Pu=!1;function pp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pu||ri==null||ri!==qs(r)||(r=ri,"selectionStart"in r&&sd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),oo&&Co(oo,r)||(oo=r,r=Js(Mu,"onSelect"),0<r.length&&(t=new rd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ri)))}function as(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ii={animationend:as("Animation","AnimationEnd"),animationiteration:as("Animation","AnimationIteration"),animationstart:as("Animation","AnimationStart"),transitionend:as("Transition","TransitionEnd")},xa={},qg={};Bn&&(qg=document.createElement("div").style,"AnimationEvent"in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),"TransitionEvent"in window||delete ii.transitionend.transition);function Rl(e){if(xa[e])return xa[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qg)return xa[e]=t[n];return e}var Kg=Rl("animationend"),Gg=Rl("animationiteration"),Yg=Rl("animationstart"),Xg=Rl("transitionend"),Qg=new Map,hp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function gr(e,t){Qg.set(e,t),Wr(t,[e])}for(var wa=0;wa<hp.length;wa++){var ka=hp[wa],l0=ka.toLowerCase(),a0=ka[0].toUpperCase()+ka.slice(1);gr(l0,"on"+a0)}gr(Kg,"onAnimationEnd");gr(Gg,"onAnimationIteration");gr(Yg,"onAnimationStart");gr("dblclick","onDoubleClick");gr("focusin","onFocus");gr("focusout","onBlur");gr(Xg,"onTransitionEnd");wi("onMouseEnter",["mouseout","mouseover"]);wi("onMouseLeave",["mouseout","mouseover"]);wi("onPointerEnter",["pointerout","pointerover"]);wi("onPointerLeave",["pointerout","pointerover"]);Wr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Wr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ji="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),u0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ji));function mp(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,lk(r,t,void 0,e),e.currentTarget=null}function Zg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;mp(i,l,u),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;mp(i,l,u),o=a}}}if(Gs)throw e=Iu,Gs=!1,Iu=null,e}function Ye(e,t){var n=t[Uu];n===void 0&&(n=t[Uu]=new Set);var r=e+"__bubble";n.has(r)||(Jg(t,e,2,!1),n.add(r))}function ba(e,t,n){var r=0;t&&(r|=4),Jg(n,e,r,t)}var us="_reactListening"+Math.random().toString(36).slice(2);function No(e){if(!e[us]){e[us]=!0,sg.forEach(function(n){n!=="selectionchange"&&(u0.has(n)||ba(n,!1,e),ba(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[us]||(t[us]=!0,ba("selectionchange",!1,t))}}function Jg(e,t,n,r){switch(Mg(t)){case 1:var i=Ek;break;case 4:i=Sk;break;default:i=td}n=i.bind(null,t,n,e),i=void 0,!Lu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ea(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=Nr(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}bg(function(){var u=o,c=Qc(n),d=[];e:{var h=Qg.get(e);if(h!==void 0){var p=rd,y=e;switch(e){case"keypress":if(As(n)===0)break e;case"keydown":case"keyup":p=Dk;break;case"focusin":y="focus",p=ga;break;case"focusout":y="blur",p=ga;break;case"beforeblur":case"afterblur":p=ga;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=rp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=jk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Uk;break;case Kg:case Gg:case Yg:p=Tk;break;case Xg:p=Wk;break;case"scroll":p=Ck;break;case"wheel":p=qk;break;case"copy":case"cut":case"paste":p=Ik;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=op}var x=(t&4)!==0,S=!x&&e==="scroll",v=x?h!==null?h+"Capture":null:h;x=[];for(var m=u,g;m!==null;){g=m;var w=g.stateNode;if(g.tag===5&&w!==null&&(g=w,v!==null&&(w=wo(m,v),w!=null&&x.push(jo(m,w,g)))),S)break;m=m.return}0<x.length&&(h=new p(h,y,null,n,c),d.push({event:h,listeners:x}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==$u&&(y=n.relatedTarget||n.fromElement)&&(Nr(y)||y[Un]))break e;if((p||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?Nr(y):null,y!==null&&(S=Vr(y),y!==S||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(x=rp,w="onMouseLeave",v="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(x=op,w="onPointerLeave",v="onPointerEnter",m="pointer"),S=p==null?h:oi(p),g=y==null?h:oi(y),h=new x(w,m+"leave",p,n,c),h.target=S,h.relatedTarget=g,w=null,Nr(c)===u&&(x=new x(v,m+"enter",y,n,c),x.target=g,x.relatedTarget=S,w=x),S=w,p&&y)t:{for(x=p,v=y,m=0,g=x;g;g=Kr(g))m++;for(g=0,w=v;w;w=Kr(w))g++;for(;0<m-g;)x=Kr(x),m--;for(;0<g-m;)v=Kr(v),g--;for(;m--;){if(x===v||v!==null&&x===v.alternate)break t;x=Kr(x),v=Kr(v)}x=null}else x=null;p!==null&&gp(d,h,p,x,!1),y!==null&&S!==null&&gp(d,S,y,x,!0)}}e:{if(h=u?oi(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var $=Jk;else if(ap(h))if(Ug)$=r0;else{$=t0;var k=e0}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&($=n0);if($&&($=$(e,u))){Bg(d,$,n,c);break e}k&&k(e,h,u),e==="focusout"&&(k=h._wrapperState)&&k.controlled&&h.type==="number"&&Su(h,"number",h.value)}switch(k=u?oi(u):window,e){case"focusin":(ap(k)||k.contentEditable==="true")&&(ri=k,Mu=u,oo=null);break;case"focusout":oo=Mu=ri=null;break;case"mousedown":Pu=!0;break;case"contextmenu":case"mouseup":case"dragend":Pu=!1,pp(d,n,c);break;case"selectionchange":if(s0)break;case"keydown":case"keyup":pp(d,n,c)}var _;if(od)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ni?Dg(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Fg&&n.locale!=="ko"&&(ni||N!=="onCompositionStart"?N==="onCompositionEnd"&&ni&&(_=Pg()):(tr=c,nd="value"in tr?tr.value:tr.textContent,ni=!0)),k=Js(u,N),0<k.length&&(N=new ip(N,e,null,n,c),d.push({event:N,listeners:k}),_?N.data=_:(_=zg(n),_!==null&&(N.data=_)))),(_=Gk?Yk(e,n):Xk(e,n))&&(u=Js(u,"onBeforeInput"),0<u.length&&(c=new ip("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=_))}Zg(d,t)})}function jo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Js(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=wo(e,n),o!=null&&r.unshift(jo(e,o,i)),o=wo(e,t),o!=null&&r.push(jo(e,o,i))),e=e.return}return r}function Kr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gp(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=wo(n,o),a!=null&&s.unshift(jo(n,a,l))):i||(a=wo(n,o),a!=null&&s.push(jo(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var c0=/\r\n?/g,d0=/\u0000|\uFFFD/g;function yp(e){return(typeof e=="string"?e:""+e).replace(c0,`
|
|
38
|
+
`).replace(d0,"")}function cs(e,t,n){if(t=yp(t),yp(e)!==t&&n)throw Error(le(425))}function el(){}var Fu=null,Du=null;function zu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bu=typeof setTimeout=="function"?setTimeout:void 0,f0=typeof clearTimeout=="function"?clearTimeout:void 0,vp=typeof Promise=="function"?Promise:void 0,p0=typeof queueMicrotask=="function"?queueMicrotask:typeof vp<"u"?function(e){return vp.resolve(null).then(e).catch(h0)}:Bu;function h0(e){setTimeout(function(){throw e})}function Sa(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Eo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Eo(t)}function sr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function xp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ii=Math.random().toString(36).slice(2),$n="__reactFiber$"+Ii,_o="__reactProps$"+Ii,Un="__reactContainer$"+Ii,Uu="__reactEvents$"+Ii,m0="__reactListeners$"+Ii,g0="__reactHandles$"+Ii;function Nr(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Un]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xp(e);e!==null;){if(n=e[$n])return n;e=xp(e)}return t}e=n,n=e.parentNode}return null}function Vo(e){return e=e[$n]||e[Un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function oi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(le(33))}function Ol(e){return e[_o]||null}var Hu=[],si=-1;function yr(e){return{current:e}}function Xe(e){0>si||(e.current=Hu[si],Hu[si]=null,si--)}function Ge(e,t){si++,Hu[si]=e.current,e.current=t}var pr={},$t=yr(pr),Dt=yr(!1),Or=pr;function ki(e,t){var n=e.type.contextTypes;if(!n)return pr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function zt(e){return e=e.childContextTypes,e!=null}function tl(){Xe(Dt),Xe($t)}function wp(e,t,n){if($t.current!==pr)throw Error(le(168));Ge($t,t),Ge(Dt,n)}function ey(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(le(108,ek(e)||"Unknown",i));return tt({},n,r)}function nl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pr,Or=$t.current,Ge($t,e),Ge(Dt,Dt.current),!0}function kp(e,t,n){var r=e.stateNode;if(!r)throw Error(le(169));n?(e=ey(e,t,Or),r.__reactInternalMemoizedMergedChildContext=e,Xe(Dt),Xe($t),Ge($t,e)):Xe(Dt),Ge(Dt,n)}var Mn=null,Ml=!1,Ca=!1;function ty(e){Mn===null?Mn=[e]:Mn.push(e)}function y0(e){Ml=!0,ty(e)}function vr(){if(!Ca&&Mn!==null){Ca=!0;var e=0,t=He;try{var n=Mn;for(He=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Mn=null,Ml=!1}catch(i){throw Mn!==null&&(Mn=Mn.slice(e+1)),Ng(Zc,vr),i}finally{He=t,Ca=!1}}return null}var li=[],ai=0,rl=null,il=0,rn=[],on=0,Mr=null,Pn=1,Fn="";function kr(e,t){li[ai++]=il,li[ai++]=rl,rl=e,il=t}function ny(e,t,n){rn[on++]=Pn,rn[on++]=Fn,rn[on++]=Mr,Mr=e;var r=Pn;e=Fn;var i=32-xn(r)-1;r&=~(1<<i),n+=1;var o=32-xn(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Pn=1<<32-xn(t)+i|n<<i|r,Fn=o+e}else Pn=1<<o|n<<i|r,Fn=e}function ld(e){e.return!==null&&(kr(e,1),ny(e,1,0))}function ad(e){for(;e===rl;)rl=li[--ai],li[ai]=null,il=li[--ai],li[ai]=null;for(;e===Mr;)Mr=rn[--on],rn[on]=null,Fn=rn[--on],rn[on]=null,Pn=rn[--on],rn[on]=null}var Kt=null,qt=null,Ze=!1,vn=null;function ry(e,t){var n=ln(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function bp(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Kt=e,qt=sr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Kt=e,qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Mr!==null?{id:Pn,overflow:Fn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Kt=e,qt=null,!0):!1;default:return!1}}function Wu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Vu(e){if(Ze){var t=qt;if(t){var n=t;if(!bp(e,t)){if(Wu(e))throw Error(le(418));t=sr(n.nextSibling);var r=Kt;t&&bp(e,t)?ry(r,n):(e.flags=e.flags&-4097|2,Ze=!1,Kt=e)}}else{if(Wu(e))throw Error(le(418));e.flags=e.flags&-4097|2,Ze=!1,Kt=e}}}function Ep(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Kt=e}function ds(e){if(e!==Kt)return!1;if(!Ze)return Ep(e),Ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!zu(e.type,e.memoizedProps)),t&&(t=qt)){if(Wu(e))throw iy(),Error(le(418));for(;t;)ry(e,t),t=sr(t.nextSibling)}if(Ep(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(le(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){qt=sr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qt=null}}else qt=Kt?sr(e.stateNode.nextSibling):null;return!0}function iy(){for(var e=qt;e;)e=sr(e.nextSibling)}function bi(){qt=Kt=null,Ze=!1}function ud(e){vn===null?vn=[e]:vn.push(e)}var v0=qn.ReactCurrentBatchConfig;function Hi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(le(309));var r=n.stateNode}if(!r)throw Error(le(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(le(284));if(!n._owner)throw Error(le(290,e))}return e}function fs(e,t){throw e=Object.prototype.toString.call(t),Error(le(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sp(e){var t=e._init;return t(e._payload)}function oy(e){function t(v,m){if(e){var g=v.deletions;g===null?(v.deletions=[m],v.flags|=16):g.push(m)}}function n(v,m){if(!e)return null;for(;m!==null;)t(v,m),m=m.sibling;return null}function r(v,m){for(v=new Map;m!==null;)m.key!==null?v.set(m.key,m):v.set(m.index,m),m=m.sibling;return v}function i(v,m){return v=cr(v,m),v.index=0,v.sibling=null,v}function o(v,m,g){return v.index=g,e?(g=v.alternate,g!==null?(g=g.index,g<m?(v.flags|=2,m):g):(v.flags|=2,m)):(v.flags|=1048576,m)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,m,g,w){return m===null||m.tag!==6?(m=Ia(g,v.mode,w),m.return=v,m):(m=i(m,g),m.return=v,m)}function a(v,m,g,w){var $=g.type;return $===ti?c(v,m,g.props.children,w,g.key):m!==null&&(m.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Xn&&Sp($)===m.type)?(w=i(m,g.props),w.ref=Hi(v,m,g),w.return=v,w):(w=zs(g.type,g.key,g.props,null,v.mode,w),w.ref=Hi(v,m,g),w.return=v,w)}function u(v,m,g,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=Aa(g,v.mode,w),m.return=v,m):(m=i(m,g.children||[]),m.return=v,m)}function c(v,m,g,w,$){return m===null||m.tag!==7?(m=Tr(g,v.mode,w,$),m.return=v,m):(m=i(m,g),m.return=v,m)}function d(v,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Ia(""+m,v.mode,g),m.return=v,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ts:return g=zs(m.type,m.key,m.props,null,v.mode,g),g.ref=Hi(v,null,m),g.return=v,g;case ei:return m=Aa(m,v.mode,g),m.return=v,m;case Xn:var w=m._init;return d(v,w(m._payload),g)}if(Qi(m)||Fi(m))return m=Tr(m,v.mode,g,null),m.return=v,m;fs(v,m)}return null}function h(v,m,g,w){var $=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return $!==null?null:l(v,m,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ts:return g.key===$?a(v,m,g,w):null;case ei:return g.key===$?u(v,m,g,w):null;case Xn:return $=g._init,h(v,m,$(g._payload),w)}if(Qi(g)||Fi(g))return $!==null?null:c(v,m,g,w,null);fs(v,g)}return null}function p(v,m,g,w,$){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(g)||null,l(m,v,""+w,$);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ts:return v=v.get(w.key===null?g:w.key)||null,a(m,v,w,$);case ei:return v=v.get(w.key===null?g:w.key)||null,u(m,v,w,$);case Xn:var k=w._init;return p(v,m,g,k(w._payload),$)}if(Qi(w)||Fi(w))return v=v.get(g)||null,c(m,v,w,$,null);fs(m,w)}return null}function y(v,m,g,w){for(var $=null,k=null,_=m,N=m=0,D=null;_!==null&&N<g.length;N++){_.index>N?(D=_,_=null):D=_.sibling;var E=h(v,_,g[N],w);if(E===null){_===null&&(_=D);break}e&&_&&E.alternate===null&&t(v,_),m=o(E,m,N),k===null?$=E:k.sibling=E,k=E,_=D}if(N===g.length)return n(v,_),Ze&&kr(v,N),$;if(_===null){for(;N<g.length;N++)_=d(v,g[N],w),_!==null&&(m=o(_,m,N),k===null?$=_:k.sibling=_,k=_);return Ze&&kr(v,N),$}for(_=r(v,_);N<g.length;N++)D=p(_,v,N,g[N],w),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?N:D.key),m=o(D,m,N),k===null?$=D:k.sibling=D,k=D);return e&&_.forEach(function(O){return t(v,O)}),Ze&&kr(v,N),$}function x(v,m,g,w){var $=Fi(g);if(typeof $!="function")throw Error(le(150));if(g=$.call(g),g==null)throw Error(le(151));for(var k=$=null,_=m,N=m=0,D=null,E=g.next();_!==null&&!E.done;N++,E=g.next()){_.index>N?(D=_,_=null):D=_.sibling;var O=h(v,_,E.value,w);if(O===null){_===null&&(_=D);break}e&&_&&O.alternate===null&&t(v,_),m=o(O,m,N),k===null?$=O:k.sibling=O,k=O,_=D}if(E.done)return n(v,_),Ze&&kr(v,N),$;if(_===null){for(;!E.done;N++,E=g.next())E=d(v,E.value,w),E!==null&&(m=o(E,m,N),k===null?$=E:k.sibling=E,k=E);return Ze&&kr(v,N),$}for(_=r(v,_);!E.done;N++,E=g.next())E=p(_,v,N,E.value,w),E!==null&&(e&&E.alternate!==null&&_.delete(E.key===null?N:E.key),m=o(E,m,N),k===null?$=E:k.sibling=E,k=E);return e&&_.forEach(function(C){return t(v,C)}),Ze&&kr(v,N),$}function S(v,m,g,w){if(typeof g=="object"&&g!==null&&g.type===ti&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case ts:e:{for(var $=g.key,k=m;k!==null;){if(k.key===$){if($=g.type,$===ti){if(k.tag===7){n(v,k.sibling),m=i(k,g.props.children),m.return=v,v=m;break e}}else if(k.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Xn&&Sp($)===k.type){n(v,k.sibling),m=i(k,g.props),m.ref=Hi(v,k,g),m.return=v,v=m;break e}n(v,k);break}else t(v,k);k=k.sibling}g.type===ti?(m=Tr(g.props.children,v.mode,w,g.key),m.return=v,v=m):(w=zs(g.type,g.key,g.props,null,v.mode,w),w.ref=Hi(v,m,g),w.return=v,v=w)}return s(v);case ei:e:{for(k=g.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){n(v,m.sibling),m=i(m,g.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=Aa(g,v.mode,w),m.return=v,v=m}return s(v);case Xn:return k=g._init,S(v,m,k(g._payload),w)}if(Qi(g))return y(v,m,g,w);if(Fi(g))return x(v,m,g,w);fs(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(n(v,m.sibling),m=i(m,g),m.return=v,v=m):(n(v,m),m=Ia(g,v.mode,w),m.return=v,v=m),s(v)):n(v,m)}return S}var Ei=oy(!0),sy=oy(!1),ol=yr(null),sl=null,ui=null,cd=null;function dd(){cd=ui=sl=null}function fd(e){var t=ol.current;Xe(ol),e._currentValue=t}function qu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function yi(e,t){sl=e,cd=ui=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ft=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(cd!==e)if(e={context:e,memoizedValue:t,next:null},ui===null){if(sl===null)throw Error(le(308));ui=e,sl.dependencies={lanes:0,firstContext:e}}else ui=ui.next=e;return t}var jr=null;function pd(e){jr===null?jr=[e]:jr.push(e)}function ly(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,pd(t)):(n.next=i.next,i.next=n),t.interleaved=n,Hn(e,r)}function Hn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Qn=!1;function hd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ay(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,De&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Hn(e,n)}return i=r.interleaved,i===null?(t.next=t,pd(r)):(t.next=i.next,i.next=t),r.interleaved=t,Hn(e,n)}function Rs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jc(e,n)}}function Cp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ll(e,t,n,r){var i=e.updateQueue;Qn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var d=i.baseState;s=0,c=u=a=null,l=o;do{var h=l.lane,p=l.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(h=t,p=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){d=y.call(p,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,h=typeof y=="function"?y.call(p,d,h):y,h==null)break e;d=tt({},d,h);break e;case 2:Qn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,a=d):c=c.next=p,s|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Fr|=s,e.lanes=s,e.memoizedState=d}}function Np(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(le(191,i));i.call(r)}}}var qo={},Ln=yr(qo),$o=yr(qo),To=yr(qo);function _r(e){if(e===qo)throw Error(le(174));return e}function md(e,t){switch(Ge(To,t),Ge($o,e),Ge(Ln,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Nu(t,e)}Xe(Ln),Ge(Ln,t)}function Si(){Xe(Ln),Xe($o),Xe(To)}function uy(e){_r(To.current);var t=_r(Ln.current),n=Nu(t,e.type);t!==n&&(Ge($o,e),Ge(Ln,n))}function gd(e){$o.current===e&&(Xe(Ln),Xe($o))}var Je=yr(0);function al(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Na=[];function yd(){for(var e=0;e<Na.length;e++)Na[e]._workInProgressVersionPrimary=null;Na.length=0}var Os=qn.ReactCurrentDispatcher,ja=qn.ReactCurrentBatchConfig,Pr=0,et=null,ct=null,mt=null,ul=!1,so=!1,Lo=0,x0=0;function Ct(){throw Error(le(321))}function vd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function xd(e,t,n,r,i,o){if(Pr=o,et=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Os.current=e===null||e.memoizedState===null?E0:S0,e=n(r,i),so){o=0;do{if(so=!1,Lo=0,25<=o)throw Error(le(301));o+=1,mt=ct=null,t.updateQueue=null,Os.current=C0,e=n(r,i)}while(so)}if(Os.current=cl,t=ct!==null&&ct.next!==null,Pr=0,mt=ct=et=null,ul=!1,t)throw Error(le(300));return e}function wd(){var e=Lo!==0;return Lo=0,e}function Nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?et.memoizedState=mt=e:mt=mt.next=e,mt}function cn(){if(ct===null){var e=et.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=mt===null?et.memoizedState:mt.next;if(t!==null)mt=t,ct=e;else{if(e===null)throw Error(le(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},mt===null?et.memoizedState=mt=e:mt=mt.next=e}return mt}function Io(e,t){return typeof t=="function"?t(e):t}function _a(e){var t=cn(),n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=e;var r=ct,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((Pr&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=d,s=r):a=a.next=d,et.lanes|=c,Fr|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,En(r,t.memoizedState)||(Ft=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,et.lanes|=o,Fr|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function $a(e){var t=cn(),n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);En(o,t.memoizedState)||(Ft=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function cy(){}function dy(e,t){var n=et,r=cn(),i=t(),o=!En(r.memoizedState,i);if(o&&(r.memoizedState=i,Ft=!0),r=r.queue,kd(hy.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||mt!==null&&mt.memoizedState.tag&1){if(n.flags|=2048,Ao(9,py.bind(null,n,r,i,t),void 0,null),gt===null)throw Error(le(349));Pr&30||fy(n,t,i)}return i}function fy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=et.updateQueue,t===null?(t={lastEffect:null,stores:null},et.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function py(e,t,n,r){t.value=n,t.getSnapshot=r,my(t)&&gy(e)}function hy(e,t,n){return n(function(){my(t)&&gy(e)})}function my(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function gy(e){var t=Hn(e,1);t!==null&&wn(t,e,1,-1)}function jp(e){var t=Nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t.queue=e,e=e.dispatch=b0.bind(null,et,e),[t.memoizedState,e]}function Ao(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=et.updateQueue,t===null?(t={lastEffect:null,stores:null},et.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function yy(){return cn().memoizedState}function Ms(e,t,n,r){var i=Nn();et.flags|=e,i.memoizedState=Ao(1|t,n,void 0,r===void 0?null:r)}function Pl(e,t,n,r){var i=cn();r=r===void 0?null:r;var o=void 0;if(ct!==null){var s=ct.memoizedState;if(o=s.destroy,r!==null&&vd(r,s.deps)){i.memoizedState=Ao(t,n,o,r);return}}et.flags|=e,i.memoizedState=Ao(1|t,n,o,r)}function _p(e,t){return Ms(8390656,8,e,t)}function kd(e,t){return Pl(2048,8,e,t)}function vy(e,t){return Pl(4,2,e,t)}function xy(e,t){return Pl(4,4,e,t)}function wy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ky(e,t,n){return n=n!=null?n.concat([e]):null,Pl(4,4,wy.bind(null,t,e),n)}function bd(){}function by(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ey(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sy(e,t,n){return Pr&21?(En(n,t)||(n=$g(),et.lanes|=n,Fr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ft=!0),e.memoizedState=n)}function w0(e,t){var n=He;He=n!==0&&4>n?n:4,e(!0);var r=ja.transition;ja.transition={};try{e(!1),t()}finally{He=n,ja.transition=r}}function Cy(){return cn().memoizedState}function k0(e,t,n){var r=ur(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ny(e))jy(t,n);else if(n=ly(e,t,n,r),n!==null){var i=It();wn(n,e,r,i),_y(n,t,r)}}function b0(e,t,n){var r=ur(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ny(e))jy(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,En(l,s)){var a=t.interleaved;a===null?(i.next=i,pd(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=ly(e,t,i,r),n!==null&&(i=It(),wn(n,e,r,i),_y(n,t,r))}}function Ny(e){var t=e.alternate;return e===et||t!==null&&t===et}function jy(e,t){so=ul=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _y(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jc(e,n)}}var cl={readContext:un,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},E0={readContext:un,useCallback:function(e,t){return Nn().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:_p,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ms(4194308,4,wy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ms(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ms(4,2,e,t)},useMemo:function(e,t){var n=Nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=k0.bind(null,et,e),[r.memoizedState,e]},useRef:function(e){var t=Nn();return e={current:e},t.memoizedState=e},useState:jp,useDebugValue:bd,useDeferredValue:function(e){return Nn().memoizedState=e},useTransition:function(){var e=jp(!1),t=e[0];return e=w0.bind(null,e[1]),Nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=et,i=Nn();if(Ze){if(n===void 0)throw Error(le(407));n=n()}else{if(n=t(),gt===null)throw Error(le(349));Pr&30||fy(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,_p(hy.bind(null,r,o,e),[e]),r.flags|=2048,Ao(9,py.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Nn(),t=gt.identifierPrefix;if(Ze){var n=Fn,r=Pn;n=(r&~(1<<32-xn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Lo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=x0++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},S0={readContext:un,useCallback:by,useContext:un,useEffect:kd,useImperativeHandle:ky,useInsertionEffect:vy,useLayoutEffect:xy,useMemo:Ey,useReducer:_a,useRef:yy,useState:function(){return _a(Io)},useDebugValue:bd,useDeferredValue:function(e){var t=cn();return Sy(t,ct.memoizedState,e)},useTransition:function(){var e=_a(Io)[0],t=cn().memoizedState;return[e,t]},useMutableSource:cy,useSyncExternalStore:dy,useId:Cy,unstable_isNewReconciler:!1},C0={readContext:un,useCallback:by,useContext:un,useEffect:kd,useImperativeHandle:ky,useInsertionEffect:vy,useLayoutEffect:xy,useMemo:Ey,useReducer:$a,useRef:yy,useState:function(){return $a(Io)},useDebugValue:bd,useDeferredValue:function(e){var t=cn();return ct===null?t.memoizedState=e:Sy(t,ct.memoizedState,e)},useTransition:function(){var e=$a(Io)[0],t=cn().memoizedState;return[e,t]},useMutableSource:cy,useSyncExternalStore:dy,useId:Cy,unstable_isNewReconciler:!1};function mn(e,t){if(e&&e.defaultProps){t=tt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ku(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:tt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fl={isMounted:function(e){return(e=e._reactInternals)?Vr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=It(),i=ur(e),o=zn(r,i);o.payload=t,n!=null&&(o.callback=n),t=lr(e,o,i),t!==null&&(wn(t,e,i,r),Rs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=It(),i=ur(e),o=zn(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=lr(e,o,i),t!==null&&(wn(t,e,i,r),Rs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=It(),r=ur(e),i=zn(n,r);i.tag=2,t!=null&&(i.callback=t),t=lr(e,i,r),t!==null&&(wn(t,e,r,n),Rs(t,e,r))}};function $p(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Co(n,r)||!Co(i,o):!0}function $y(e,t,n){var r=!1,i=pr,o=t.contextType;return typeof o=="object"&&o!==null?o=un(o):(i=zt(t)?Or:$t.current,r=t.contextTypes,o=(r=r!=null)?ki(e,i):pr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Fl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Tp(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Fl.enqueueReplaceState(t,t.state,null)}function Gu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},hd(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=un(o):(o=zt(t)?Or:$t.current,i.context=ki(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ku(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Fl.enqueueReplaceState(i,i.state,null),ll(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ci(e,t){try{var n="",r=t;do n+=Jw(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Ta(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Yu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var N0=typeof WeakMap=="function"?WeakMap:Map;function Ty(e,t,n){n=zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fl||(fl=!0,oc=r),Yu(e,t)},n}function Ly(e,t,n){n=zn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Yu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Yu(e,t),typeof r!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Lp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new N0;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=z0.bind(null,e,t,n),t.then(e,e))}function Ip(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ap(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zn(-1,1),t.tag=2,lr(n,t,1))),n.lanes|=1),e)}var j0=qn.ReactCurrentOwner,Ft=!1;function Lt(e,t,n,r){t.child=e===null?sy(t,null,n,r):Ei(t,e.child,n,r)}function Rp(e,t,n,r,i){n=n.render;var o=t.ref;return yi(t,i),r=xd(e,t,n,r,o,i),n=wd(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(Ze&&n&&ld(t),t.flags|=1,Lt(e,t,r,i),t.child)}function Op(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Td(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Iy(e,t,o,r,i)):(e=zs(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Co,n(s,r)&&e.ref===t.ref)return Wn(e,t,i)}return t.flags|=1,e=cr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Iy(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Co(o,r)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Ft=!0);else return t.lanes=e.lanes,Wn(e,t,i)}return Xu(e,t,n,r,i)}function Ay(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ge(di,Vt),Vt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ge(di,Vt),Vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Ge(di,Vt),Vt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ge(di,Vt),Vt|=r;return Lt(e,t,i,n),t.child}function Ry(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xu(e,t,n,r,i){var o=zt(n)?Or:$t.current;return o=ki(t,o),yi(t,i),n=xd(e,t,n,r,o,i),r=wd(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(Ze&&r&&ld(t),t.flags|=1,Lt(e,t,n,i),t.child)}function Mp(e,t,n,r,i){if(zt(n)){var o=!0;nl(t)}else o=!1;if(yi(t,i),t.stateNode===null)Ps(e,t),$y(t,n,r),Gu(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=un(u):(u=zt(n)?Or:$t.current,u=ki(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Tp(t,s,r,u),Qn=!1;var h=t.memoizedState;s.state=h,ll(t,r,s,i),a=t.memoizedState,l!==r||h!==a||Dt.current||Qn?(typeof c=="function"&&(Ku(t,n,c,r),a=t.memoizedState),(l=Qn||$p(t,n,l,r,h,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,ay(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:mn(t.type,l),s.props=u,d=t.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=un(a):(a=zt(n)?Or:$t.current,a=ki(t,a));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||h!==a)&&Tp(t,s,r,a),Qn=!1,h=t.memoizedState,s.state=h,ll(t,r,s,i);var y=t.memoizedState;l!==d||h!==y||Dt.current||Qn?(typeof p=="function"&&(Ku(t,n,p,r),y=t.memoizedState),(u=Qn||$p(t,n,u,r,h,y,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Qu(e,t,n,r,o,i)}function Qu(e,t,n,r,i,o){Ry(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&kp(t,n,!1),Wn(e,t,o);r=t.stateNode,j0.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ei(t,e.child,null,o),t.child=Ei(t,null,l,o)):Lt(e,t,l,o),t.memoizedState=r.state,i&&kp(t,n,!0),t.child}function Oy(e){var t=e.stateNode;t.pendingContext?wp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wp(e,t.context,!1),md(e,t.containerInfo)}function Pp(e,t,n,r,i){return bi(),ud(i),t.flags|=256,Lt(e,t,n,r),t.child}var Zu={dehydrated:null,treeContext:null,retryLane:0};function Ju(e){return{baseLanes:e,cachePool:null,transitions:null}}function My(e,t,n){var r=t.pendingProps,i=Je.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ge(Je,i&1),e===null)return Vu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Bl(s,r,0,null),e=Tr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ju(n),t.memoizedState=Zu,e):Ed(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return _0(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=cr(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=cr(l,o):(o=Tr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Ju(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Zu,r}return o=e.child,e=o.sibling,r=cr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ed(e,t){return t=Bl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ps(e,t,n,r){return r!==null&&ud(r),Ei(t,e.child,null,n),e=Ed(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _0(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Ta(Error(le(422))),ps(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Bl({mode:"visible",children:r.children},i,0,null),o=Tr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Ei(t,e.child,null,s),t.child.memoizedState=Ju(s),t.memoizedState=Zu,o);if(!(t.mode&1))return ps(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(le(419)),r=Ta(o,r,void 0),ps(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ft||l){if(r=gt,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Hn(e,i),wn(r,e,i,-1))}return $d(),r=Ta(Error(le(421))),ps(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=B0.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,qt=sr(i.nextSibling),Kt=t,Ze=!0,vn=null,e!==null&&(rn[on++]=Pn,rn[on++]=Fn,rn[on++]=Mr,Pn=e.id,Fn=e.overflow,Mr=t),t=Ed(t,r.children),t.flags|=4096,t)}function Fp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qu(e.return,t,n)}function La(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Py(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Lt(e,t,r.children,n),r=Je.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fp(e,n,t);else if(e.tag===19)Fp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ge(Je,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&al(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),La(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&al(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}La(t,!0,n,null,o);break;case"together":La(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ps(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Fr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(le(153));if(t.child!==null){for(e=t.child,n=cr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $0(e,t,n){switch(t.tag){case 3:Oy(t),bi();break;case 5:uy(t);break;case 1:zt(t.type)&&nl(t);break;case 4:md(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ge(ol,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ge(Je,Je.current&1),t.flags|=128,null):n&t.child.childLanes?My(e,t,n):(Ge(Je,Je.current&1),e=Wn(e,t,n),e!==null?e.sibling:null);Ge(Je,Je.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Py(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ge(Je,Je.current),r)break;return null;case 22:case 23:return t.lanes=0,Ay(e,t,n)}return Wn(e,t,n)}var Fy,ec,Dy,zy;Fy=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ec=function(){};Dy=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_r(Ln.current);var o=null;switch(n){case"input":i=bu(e,i),r=bu(e,r),o=[];break;case"select":i=tt({},i,{value:void 0}),r=tt({},r,{value:void 0}),o=[];break;case"textarea":i=Cu(e,i),r=Cu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=el)}ju(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(vo.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(vo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ye("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};zy=function(e,t,n,r){n!==r&&(t.flags|=4)};function Wi(e,t){if(!Ze)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function T0(e,t,n){var r=t.pendingProps;switch(ad(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(t),null;case 1:return zt(t.type)&&tl(),Nt(t),null;case 3:return r=t.stateNode,Si(),Xe(Dt),Xe($t),yd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ds(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vn!==null&&(ac(vn),vn=null))),ec(e,t),Nt(t),null;case 5:gd(t);var i=_r(To.current);if(n=t.type,e!==null&&t.stateNode!=null)Dy(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(le(166));return Nt(t),null}if(e=_r(Ln.current),ds(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[$n]=t,r[_o]=o,e=(t.mode&1)!==0,n){case"dialog":Ye("cancel",r),Ye("close",r);break;case"iframe":case"object":case"embed":Ye("load",r);break;case"video":case"audio":for(i=0;i<Ji.length;i++)Ye(Ji[i],r);break;case"source":Ye("error",r);break;case"img":case"image":case"link":Ye("error",r),Ye("load",r);break;case"details":Ye("toggle",r);break;case"input":Kf(r,o),Ye("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ye("invalid",r);break;case"textarea":Yf(r,o),Ye("invalid",r)}ju(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&cs(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&cs(r.textContent,l,e),i=["children",""+l]):vo.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Ye("scroll",r)}switch(n){case"input":ns(r),Gf(r,o,!0);break;case"textarea":ns(r),Xf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=el)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hg(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[$n]=t,e[_o]=r,Fy(e,t,!1,!1),t.stateNode=e;e:{switch(s=_u(n,r),n){case"dialog":Ye("cancel",e),Ye("close",e),i=r;break;case"iframe":case"object":case"embed":Ye("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ji.length;i++)Ye(Ji[i],e);i=r;break;case"source":Ye("error",e),i=r;break;case"img":case"image":case"link":Ye("error",e),Ye("load",e),i=r;break;case"details":Ye("toggle",e),i=r;break;case"input":Kf(e,r),i=bu(e,r),Ye("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=tt({},r,{value:void 0}),Ye("invalid",e);break;case"textarea":Yf(e,r),i=Cu(e,r),Ye("invalid",e);break;default:i=r}ju(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?yg(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&mg(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&xo(e,a):typeof a=="number"&&xo(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(vo.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Ye("scroll",e):a!=null&&Kc(e,o,a,s))}switch(n){case"input":ns(e),Gf(e,r,!1);break;case"textarea":ns(e),Xf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fr(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?pi(e,!!r.multiple,o,!1):r.defaultValue!=null&&pi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=el)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Nt(t),null;case 6:if(e&&t.stateNode!=null)zy(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(le(166));if(n=_r(To.current),_r(Ln.current),ds(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(o=r.nodeValue!==n)&&(e=Kt,e!==null))switch(e.tag){case 3:cs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&cs(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return Nt(t),null;case 13:if(Xe(Je),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ze&&qt!==null&&t.mode&1&&!(t.flags&128))iy(),bi(),t.flags|=98560,o=!1;else if(o=ds(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(le(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(le(317));o[$n]=t}else bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nt(t),o=!1}else vn!==null&&(ac(vn),vn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Je.current&1?dt===0&&(dt=3):$d())),t.updateQueue!==null&&(t.flags|=4),Nt(t),null);case 4:return Si(),ec(e,t),e===null&&No(t.stateNode.containerInfo),Nt(t),null;case 10:return fd(t.type._context),Nt(t),null;case 17:return zt(t.type)&&tl(),Nt(t),null;case 19:if(Xe(Je),o=t.memoizedState,o===null)return Nt(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Wi(o,!1);else{if(dt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=al(e),s!==null){for(t.flags|=128,Wi(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ge(Je,Je.current&1|2),t.child}e=e.sibling}o.tail!==null&&it()>Ni&&(t.flags|=128,r=!0,Wi(o,!1),t.lanes=4194304)}else{if(!r)if(e=al(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ze)return Nt(t),null}else 2*it()-o.renderingStartTime>Ni&&n!==1073741824&&(t.flags|=128,r=!0,Wi(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=it(),t.sibling=null,n=Je.current,Ge(Je,r?n&1|2:n&1),t):(Nt(t),null);case 22:case 23:return _d(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vt&1073741824&&(Nt(t),t.subtreeFlags&6&&(t.flags|=8192)):Nt(t),null;case 24:return null;case 25:return null}throw Error(le(156,t.tag))}function L0(e,t){switch(ad(t),t.tag){case 1:return zt(t.type)&&tl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Si(),Xe(Dt),Xe($t),yd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gd(t),null;case 13:if(Xe(Je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(le(340));bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xe(Je),null;case 4:return Si(),null;case 10:return fd(t.type._context),null;case 22:case 23:return _d(),null;case 24:return null;default:return null}}var hs=!1,jt=!1,I0=typeof WeakSet=="function"?WeakSet:Set,we=null;function ci(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){rt(e,t,r)}else n.current=null}function tc(e,t,n){try{n()}catch(r){rt(e,t,r)}}var Dp=!1;function A0(e,t){if(Fu=Qs,e=Vg(),sd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==o||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++u===i&&(l=s),h===o&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Du={focusedElem:e,selectionRange:n},Qs=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,S=y.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?x:mn(t.type,x),S);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(w){rt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return y=Dp,Dp=!1,y}function lo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&tc(t,n,o)}i=i.next}while(i!==r)}}function Dl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function By(e){var t=e.alternate;t!==null&&(e.alternate=null,By(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[_o],delete t[Uu],delete t[m0],delete t[g0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Uy(e){return e.tag===5||e.tag===3||e.tag===4}function zp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=el));else if(r!==4&&(e=e.child,e!==null))for(rc(e,t,n),e=e.sibling;e!==null;)rc(e,t,n),e=e.sibling}function ic(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ic(e,t,n),e=e.sibling;e!==null;)ic(e,t,n),e=e.sibling}var yt=null,gn=!1;function Gn(e,t,n){for(n=n.child;n!==null;)Hy(e,t,n),n=n.sibling}function Hy(e,t,n){if(Tn&&typeof Tn.onCommitFiberUnmount=="function")try{Tn.onCommitFiberUnmount(Ll,n)}catch{}switch(n.tag){case 5:jt||ci(n,t);case 6:var r=yt,i=gn;yt=null,Gn(e,t,n),yt=r,gn=i,yt!==null&&(gn?(e=yt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):yt.removeChild(n.stateNode));break;case 18:yt!==null&&(gn?(e=yt,n=n.stateNode,e.nodeType===8?Sa(e.parentNode,n):e.nodeType===1&&Sa(e,n),Eo(e)):Sa(yt,n.stateNode));break;case 4:r=yt,i=gn,yt=n.stateNode.containerInfo,gn=!0,Gn(e,t,n),yt=r,gn=i;break;case 0:case 11:case 14:case 15:if(!jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&tc(n,t,s),i=i.next}while(i!==r)}Gn(e,t,n);break;case 1:if(!jt&&(ci(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){rt(n,t,l)}Gn(e,t,n);break;case 21:Gn(e,t,n);break;case 22:n.mode&1?(jt=(r=jt)||n.memoizedState!==null,Gn(e,t,n),jt=r):Gn(e,t,n);break;default:Gn(e,t,n)}}function Bp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new I0),t.forEach(function(r){var i=U0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:yt=l.stateNode,gn=!1;break e;case 3:yt=l.stateNode.containerInfo,gn=!0;break e;case 4:yt=l.stateNode.containerInfo,gn=!0;break e}l=l.return}if(yt===null)throw Error(le(160));Hy(o,s,i),yt=null,gn=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){rt(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wy(t,e),t=t.sibling}function Wy(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),Cn(e),r&4){try{lo(3,e,e.return),Dl(3,e)}catch(x){rt(e,e.return,x)}try{lo(5,e,e.return)}catch(x){rt(e,e.return,x)}}break;case 1:hn(t,e),Cn(e),r&512&&n!==null&&ci(n,n.return);break;case 5:if(hn(t,e),Cn(e),r&512&&n!==null&&ci(n,n.return),e.flags&32){var i=e.stateNode;try{xo(i,"")}catch(x){rt(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&fg(i,o),_u(l,s);var u=_u(l,o);for(s=0;s<a.length;s+=2){var c=a[s],d=a[s+1];c==="style"?yg(i,d):c==="dangerouslySetInnerHTML"?mg(i,d):c==="children"?xo(i,d):Kc(i,c,d,u)}switch(l){case"input":Eu(i,o);break;case"textarea":pg(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?pi(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?pi(i,!!o.multiple,o.defaultValue,!0):pi(i,!!o.multiple,o.multiple?[]:"",!1))}i[_o]=o}catch(x){rt(e,e.return,x)}}break;case 6:if(hn(t,e),Cn(e),r&4){if(e.stateNode===null)throw Error(le(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(x){rt(e,e.return,x)}}break;case 3:if(hn(t,e),Cn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Eo(t.containerInfo)}catch(x){rt(e,e.return,x)}break;case 4:hn(t,e),Cn(e);break;case 13:hn(t,e),Cn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Nd=it())),r&4&&Bp(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(jt=(u=jt)||c,hn(t,e),jt=u):hn(t,e),Cn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(we=e,c=e.child;c!==null;){for(d=we=c;we!==null;){switch(h=we,p=h.child,h.tag){case 0:case 11:case 14:case 15:lo(4,h,h.return);break;case 1:ci(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){rt(r,n,x)}}break;case 5:ci(h,h.return);break;case 22:if(h.memoizedState!==null){Hp(d);continue}}p!==null?(p.return=h,we=p):Hp(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,a=d.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=gg("display",s))}catch(x){rt(e,e.return,x)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(x){rt(e,e.return,x)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:hn(t,e),Cn(e),r&4&&Bp(e);break;case 21:break;default:hn(t,e),Cn(e)}}function Cn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Uy(n)){var r=n;break e}n=n.return}throw Error(le(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(xo(i,""),r.flags&=-33);var o=zp(e);ic(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=zp(e);rc(e,l,s);break;default:throw Error(le(161))}}catch(a){rt(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function R0(e,t,n){we=e,Vy(e)}function Vy(e,t,n){for(var r=(e.mode&1)!==0;we!==null;){var i=we,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||hs;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||jt;l=hs;var u=jt;if(hs=s,(jt=a)&&!u)for(we=i;we!==null;)s=we,a=s.child,s.tag===22&&s.memoizedState!==null?Wp(i):a!==null?(a.return=s,we=a):Wp(i);for(;o!==null;)we=o,Vy(o),o=o.sibling;we=i,hs=l,jt=u}Up(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,we=o):Up(e)}}function Up(e){for(;we!==null;){var t=we;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:jt||Dl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!jt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Np(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Np(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Eo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(le(163))}jt||t.flags&512&&nc(t)}catch(h){rt(t,t.return,h)}}if(t===e){we=null;break}if(n=t.sibling,n!==null){n.return=t.return,we=n;break}we=t.return}}function Hp(e){for(;we!==null;){var t=we;if(t===e){we=null;break}var n=t.sibling;if(n!==null){n.return=t.return,we=n;break}we=t.return}}function Wp(e){for(;we!==null;){var t=we;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Dl(4,t)}catch(a){rt(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){rt(t,i,a)}}var o=t.return;try{nc(t)}catch(a){rt(t,o,a)}break;case 5:var s=t.return;try{nc(t)}catch(a){rt(t,s,a)}}}catch(a){rt(t,t.return,a)}if(t===e){we=null;break}var l=t.sibling;if(l!==null){l.return=t.return,we=l;break}we=t.return}}var O0=Math.ceil,dl=qn.ReactCurrentDispatcher,Sd=qn.ReactCurrentOwner,an=qn.ReactCurrentBatchConfig,De=0,gt=null,lt=null,kt=0,Vt=0,di=yr(0),dt=0,Ro=null,Fr=0,zl=0,Cd=0,ao=null,Pt=null,Nd=0,Ni=1/0,On=null,fl=!1,oc=null,ar=null,ms=!1,nr=null,pl=0,uo=0,sc=null,Fs=-1,Ds=0;function It(){return De&6?it():Fs!==-1?Fs:Fs=it()}function ur(e){return e.mode&1?De&2&&kt!==0?kt&-kt:v0.transition!==null?(Ds===0&&(Ds=$g()),Ds):(e=He,e!==0||(e=window.event,e=e===void 0?16:Mg(e.type)),e):1}function wn(e,t,n,r){if(50<uo)throw uo=0,sc=null,Error(le(185));Ho(e,n,r),(!(De&2)||e!==gt)&&(e===gt&&(!(De&2)&&(zl|=n),dt===4&&Jn(e,kt)),Bt(e,r),n===1&&De===0&&!(t.mode&1)&&(Ni=it()+500,Ml&&vr()))}function Bt(e,t){var n=e.callbackNode;vk(e,t);var r=Xs(e,e===gt?kt:0);if(r===0)n!==null&&Jf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Jf(n),t===1)e.tag===0?y0(Vp.bind(null,e)):ty(Vp.bind(null,e)),p0(function(){!(De&6)&&vr()}),n=null;else{switch(Tg(r)){case 1:n=Zc;break;case 4:n=jg;break;case 16:n=Ys;break;case 536870912:n=_g;break;default:n=Ys}n=Jy(n,qy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qy(e,t){if(Fs=-1,Ds=0,De&6)throw Error(le(327));var n=e.callbackNode;if(vi()&&e.callbackNode!==n)return null;var r=Xs(e,e===gt?kt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=hl(e,r);else{t=r;var i=De;De|=2;var o=Gy();(gt!==e||kt!==t)&&(On=null,Ni=it()+500,$r(e,t));do try{F0();break}catch(l){Ky(e,l)}while(!0);dd(),dl.current=o,De=i,lt!==null?t=0:(gt=null,kt=0,t=dt)}if(t!==0){if(t===2&&(i=Au(e),i!==0&&(r=i,t=lc(e,i))),t===1)throw n=Ro,$r(e,0),Jn(e,r),Bt(e,it()),n;if(t===6)Jn(e,r);else{if(i=e.current.alternate,!(r&30)&&!M0(i)&&(t=hl(e,r),t===2&&(o=Au(e),o!==0&&(r=o,t=lc(e,o))),t===1))throw n=Ro,$r(e,0),Jn(e,r),Bt(e,it()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(le(345));case 2:br(e,Pt,On);break;case 3:if(Jn(e,r),(r&130023424)===r&&(t=Nd+500-it(),10<t)){if(Xs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){It(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Bu(br.bind(null,e,Pt,On),t);break}br(e,Pt,On);break;case 4:if(Jn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-xn(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=it()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*O0(r/1960))-r,10<r){e.timeoutHandle=Bu(br.bind(null,e,Pt,On),r);break}br(e,Pt,On);break;case 5:br(e,Pt,On);break;default:throw Error(le(329))}}}return Bt(e,it()),e.callbackNode===n?qy.bind(null,e):null}function lc(e,t){var n=ao;return e.current.memoizedState.isDehydrated&&($r(e,t).flags|=256),e=hl(e,t),e!==2&&(t=Pt,Pt=n,t!==null&&ac(t)),e}function ac(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function M0(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!En(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Jn(e,t){for(t&=~Cd,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-xn(t),r=1<<n;e[n]=-1,t&=~r}}function Vp(e){if(De&6)throw Error(le(327));vi();var t=Xs(e,0);if(!(t&1))return Bt(e,it()),null;var n=hl(e,t);if(e.tag!==0&&n===2){var r=Au(e);r!==0&&(t=r,n=lc(e,r))}if(n===1)throw n=Ro,$r(e,0),Jn(e,t),Bt(e,it()),n;if(n===6)throw Error(le(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,br(e,Pt,On),Bt(e,it()),null}function jd(e,t){var n=De;De|=1;try{return e(t)}finally{De=n,De===0&&(Ni=it()+500,Ml&&vr())}}function Dr(e){nr!==null&&nr.tag===0&&!(De&6)&&vi();var t=De;De|=1;var n=an.transition,r=He;try{if(an.transition=null,He=1,e)return e()}finally{He=r,an.transition=n,De=t,!(De&6)&&vr()}}function _d(){Vt=di.current,Xe(di)}function $r(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,f0(n)),lt!==null)for(n=lt.return;n!==null;){var r=n;switch(ad(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&tl();break;case 3:Si(),Xe(Dt),Xe($t),yd();break;case 5:gd(r);break;case 4:Si();break;case 13:Xe(Je);break;case 19:Xe(Je);break;case 10:fd(r.type._context);break;case 22:case 23:_d()}n=n.return}if(gt=e,lt=e=cr(e.current,null),kt=Vt=t,dt=0,Ro=null,Cd=zl=Fr=0,Pt=ao=null,jr!==null){for(t=0;t<jr.length;t++)if(n=jr[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}jr=null}return e}function Ky(e,t){do{var n=lt;try{if(dd(),Os.current=cl,ul){for(var r=et.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ul=!1}if(Pr=0,mt=ct=et=null,so=!1,Lo=0,Sd.current=null,n===null||n.return===null){dt=1,Ro=t,lt=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=kt,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Ip(s);if(p!==null){p.flags&=-257,Ap(p,s,l,o,t),p.mode&1&&Lp(o,u,t),t=p,a=u;var y=t.updateQueue;if(y===null){var x=new Set;x.add(a),t.updateQueue=x}else y.add(a);break e}else{if(!(t&1)){Lp(o,u,t),$d();break e}a=Error(le(426))}}else if(Ze&&l.mode&1){var S=Ip(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Ap(S,s,l,o,t),ud(Ci(a,l));break e}}o=a=Ci(a,l),dt!==4&&(dt=2),ao===null?ao=[o]:ao.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Ty(o,a,t);Cp(o,v);break e;case 1:l=a;var m=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(ar===null||!ar.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=Ly(o,l,t);Cp(o,w);break e}}o=o.return}while(o!==null)}Xy(n)}catch($){t=$,lt===n&&n!==null&&(lt=n=n.return);continue}break}while(!0)}function Gy(){var e=dl.current;return dl.current=cl,e===null?cl:e}function $d(){(dt===0||dt===3||dt===2)&&(dt=4),gt===null||!(Fr&268435455)&&!(zl&268435455)||Jn(gt,kt)}function hl(e,t){var n=De;De|=2;var r=Gy();(gt!==e||kt!==t)&&(On=null,$r(e,t));do try{P0();break}catch(i){Ky(e,i)}while(!0);if(dd(),De=n,dl.current=r,lt!==null)throw Error(le(261));return gt=null,kt=0,dt}function P0(){for(;lt!==null;)Yy(lt)}function F0(){for(;lt!==null&&!uk();)Yy(lt)}function Yy(e){var t=Zy(e.alternate,e,Vt);e.memoizedProps=e.pendingProps,t===null?Xy(e):lt=t,Sd.current=null}function Xy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=L0(n,t),n!==null){n.flags&=32767,lt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{dt=6,lt=null;return}}else if(n=T0(n,t,Vt),n!==null){lt=n;return}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);dt===0&&(dt=5)}function br(e,t,n){var r=He,i=an.transition;try{an.transition=null,He=1,D0(e,t,n,r)}finally{an.transition=i,He=r}return null}function D0(e,t,n,r){do vi();while(nr!==null);if(De&6)throw Error(le(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(le(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(xk(e,o),e===gt&&(lt=gt=null,kt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ms||(ms=!0,Jy(Ys,function(){return vi(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=an.transition,an.transition=null;var s=He;He=1;var l=De;De|=4,Sd.current=null,A0(e,n),Wy(n,e),o0(Du),Qs=!!Fu,Du=Fu=null,e.current=n,R0(n),ck(),De=l,He=s,an.transition=o}else e.current=n;if(ms&&(ms=!1,nr=e,pl=i),o=e.pendingLanes,o===0&&(ar=null),pk(n.stateNode),Bt(e,it()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(fl)throw fl=!1,e=oc,oc=null,e;return pl&1&&e.tag!==0&&vi(),o=e.pendingLanes,o&1?e===sc?uo++:(uo=0,sc=e):uo=0,vr(),null}function vi(){if(nr!==null){var e=Tg(pl),t=an.transition,n=He;try{if(an.transition=null,He=16>e?16:e,nr===null)var r=!1;else{if(e=nr,nr=null,pl=0,De&6)throw Error(le(331));var i=De;for(De|=4,we=e.current;we!==null;){var o=we,s=o.child;if(we.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(we=u;we!==null;){var c=we;switch(c.tag){case 0:case 11:case 15:lo(8,c,o)}var d=c.child;if(d!==null)d.return=c,we=d;else for(;we!==null;){c=we;var h=c.sibling,p=c.return;if(By(c),c===u){we=null;break}if(h!==null){h.return=p,we=h;break}we=p}}}var y=o.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var S=x.sibling;x.sibling=null,x=S}while(x!==null)}}we=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,we=s;else e:for(;we!==null;){if(o=we,o.flags&2048)switch(o.tag){case 0:case 11:case 15:lo(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,we=v;break e}we=o.return}}var m=e.current;for(we=m;we!==null;){s=we;var g=s.child;if(s.subtreeFlags&2064&&g!==null)g.return=s,we=g;else e:for(s=m;we!==null;){if(l=we,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Dl(9,l)}}catch($){rt(l,l.return,$)}if(l===s){we=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,we=w;break e}we=l.return}}if(De=i,vr(),Tn&&typeof Tn.onPostCommitFiberRoot=="function")try{Tn.onPostCommitFiberRoot(Ll,e)}catch{}r=!0}return r}finally{He=n,an.transition=t}}return!1}function qp(e,t,n){t=Ci(n,t),t=Ty(e,t,1),e=lr(e,t,1),t=It(),e!==null&&(Ho(e,1,t),Bt(e,t))}function rt(e,t,n){if(e.tag===3)qp(e,e,n);else for(;t!==null;){if(t.tag===3){qp(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ar===null||!ar.has(r))){e=Ci(n,e),e=Ly(t,e,1),t=lr(t,e,1),e=It(),t!==null&&(Ho(t,1,e),Bt(t,e));break}}t=t.return}}function z0(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=It(),e.pingedLanes|=e.suspendedLanes&n,gt===e&&(kt&n)===n&&(dt===4||dt===3&&(kt&130023424)===kt&&500>it()-Nd?$r(e,0):Cd|=n),Bt(e,t)}function Qy(e,t){t===0&&(e.mode&1?(t=os,os<<=1,!(os&130023424)&&(os=4194304)):t=1);var n=It();e=Hn(e,t),e!==null&&(Ho(e,t,n),Bt(e,n))}function B0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qy(e,n)}function U0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(le(314))}r!==null&&r.delete(t),Qy(e,n)}var Zy;Zy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Dt.current)Ft=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ft=!1,$0(e,t,n);Ft=!!(e.flags&131072)}else Ft=!1,Ze&&t.flags&1048576&&ny(t,il,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ps(e,t),e=t.pendingProps;var i=ki(t,$t.current);yi(t,n),i=xd(null,t,r,e,i,n);var o=wd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zt(r)?(o=!0,nl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,hd(t),i.updater=Fl,t.stateNode=i,i._reactInternals=t,Gu(t,r,e,n),t=Qu(null,t,r,!0,o,n)):(t.tag=0,Ze&&o&&ld(t),Lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ps(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=W0(r),e=mn(r,e),i){case 0:t=Xu(null,t,r,e,n);break e;case 1:t=Mp(null,t,r,e,n);break e;case 11:t=Rp(null,t,r,e,n);break e;case 14:t=Op(null,t,r,mn(r.type,e),n);break e}throw Error(le(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Xu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Mp(e,t,r,i,n);case 3:e:{if(Oy(t),e===null)throw Error(le(387));r=t.pendingProps,o=t.memoizedState,i=o.element,ay(e,t),ll(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ci(Error(le(423)),t),t=Pp(e,t,r,n,i);break e}else if(r!==i){i=Ci(Error(le(424)),t),t=Pp(e,t,r,n,i);break e}else for(qt=sr(t.stateNode.containerInfo.firstChild),Kt=t,Ze=!0,vn=null,n=sy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bi(),r===i){t=Wn(e,t,n);break e}Lt(e,t,r,n)}t=t.child}return t;case 5:return uy(t),e===null&&Vu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,zu(r,i)?s=null:o!==null&&zu(r,o)&&(t.flags|=32),Ry(e,t),Lt(e,t,s,n),t.child;case 6:return e===null&&Vu(t),null;case 13:return My(e,t,n);case 4:return md(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ei(t,null,r,n):Lt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Rp(e,t,r,i,n);case 7:return Lt(e,t,t.pendingProps,n),t.child;case 8:return Lt(e,t,t.pendingProps.children,n),t.child;case 12:return Lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ge(ol,r._currentValue),r._currentValue=s,o!==null)if(En(o.value,s)){if(o.children===i.children&&!Dt.current){t=Wn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=zn(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),qu(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(le(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),qu(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Lt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,yi(t,n),i=un(i),r=r(i),t.flags|=1,Lt(e,t,r,n),t.child;case 14:return r=t.type,i=mn(r,t.pendingProps),i=mn(r.type,i),Op(e,t,r,i,n);case 15:return Iy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Ps(e,t),t.tag=1,zt(r)?(e=!0,nl(t)):e=!1,yi(t,n),$y(t,r,i),Gu(t,r,i,n),Qu(null,t,r,!0,e,n);case 19:return Py(e,t,n);case 22:return Ay(e,t,n)}throw Error(le(156,t.tag))};function Jy(e,t){return Ng(e,t)}function H0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,n,r){return new H0(e,t,n,r)}function Td(e){return e=e.prototype,!(!e||!e.isReactComponent)}function W0(e){if(typeof e=="function")return Td(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yc)return 11;if(e===Xc)return 14}return 2}function cr(e,t){var n=e.alternate;return n===null?(n=ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zs(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Td(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ti:return Tr(n.children,i,o,t);case Gc:s=8,i|=8;break;case vu:return e=ln(12,n,t,i|2),e.elementType=vu,e.lanes=o,e;case xu:return e=ln(13,n,t,i),e.elementType=xu,e.lanes=o,e;case wu:return e=ln(19,n,t,i),e.elementType=wu,e.lanes=o,e;case ug:return Bl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lg:s=10;break e;case ag:s=9;break e;case Yc:s=11;break e;case Xc:s=14;break e;case Xn:s=16,r=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return t=ln(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Tr(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function Bl(e,t,n,r){return e=ln(22,e,r,t),e.elementType=ug,e.lanes=n,e.stateNode={isHidden:!1},e}function Ia(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function Aa(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function V0(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pa(0),this.expirationTimes=pa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pa(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ld(e,t,n,r,i,o,s,l,a){return e=new V0(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ln(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hd(o),e}function q0(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ei,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ev(e){if(!e)return pr;e=e._reactInternals;e:{if(Vr(e)!==e||e.tag!==1)throw Error(le(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(zt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(le(171))}if(e.tag===1){var n=e.type;if(zt(n))return ey(e,n,t)}return t}function tv(e,t,n,r,i,o,s,l,a){return e=Ld(n,r,!0,e,i,o,s,l,a),e.context=ev(null),n=e.current,r=It(),i=ur(n),o=zn(r,i),o.callback=t??null,lr(n,o,i),e.current.lanes=i,Ho(e,i,r),Bt(e,r),e}function Ul(e,t,n,r){var i=t.current,o=It(),s=ur(i);return n=ev(n),t.context===null?t.context=n:t.pendingContext=n,t=zn(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=lr(i,t,s),e!==null&&(wn(e,i,s,o),Rs(e,i,s)),s}function ml(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Id(e,t){Kp(e,t),(e=e.alternate)&&Kp(e,t)}function K0(){return null}var nv=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ad(e){this._internalRoot=e}Hl.prototype.render=Ad.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(le(409));Ul(e,t,null,null)};Hl.prototype.unmount=Ad.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dr(function(){Ul(null,e,null,null)}),t[Un]=null}};function Hl(e){this._internalRoot=e}Hl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ag();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zn.length&&t!==0&&t<Zn[n].priority;n++);Zn.splice(n,0,e),n===0&&Og(e)}};function Rd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gp(){}function G0(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=ml(s);o.call(u)}}var s=tv(t,r,e,0,null,!1,!1,"",Gp);return e._reactRootContainer=s,e[Un]=s.current,No(e.nodeType===8?e.parentNode:e),Dr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=ml(a);l.call(u)}}var a=Ld(e,0,!1,null,null,!1,!1,"",Gp);return e._reactRootContainer=a,e[Un]=a.current,No(e.nodeType===8?e.parentNode:e),Dr(function(){Ul(t,a,n,r)}),a}function Vl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=ml(s);l.call(a)}}Ul(t,s,e,i)}else s=G0(n,t,e,i,r);return ml(s)}Lg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Zi(t.pendingLanes);n!==0&&(Jc(t,n|1),Bt(t,it()),!(De&6)&&(Ni=it()+500,vr()))}break;case 13:Dr(function(){var r=Hn(e,1);if(r!==null){var i=It();wn(r,e,1,i)}}),Id(e,1)}};ed=function(e){if(e.tag===13){var t=Hn(e,134217728);if(t!==null){var n=It();wn(t,e,134217728,n)}Id(e,134217728)}};Ig=function(e){if(e.tag===13){var t=ur(e),n=Hn(e,t);if(n!==null){var r=It();wn(n,e,t,r)}Id(e,t)}};Ag=function(){return He};Rg=function(e,t){var n=He;try{return He=e,t()}finally{He=n}};Tu=function(e,t,n){switch(t){case"input":if(Eu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ol(r);if(!i)throw Error(le(90));dg(r),Eu(r,i)}}}break;case"textarea":pg(e,n);break;case"select":t=n.value,t!=null&&pi(e,!!n.multiple,t,!1)}};wg=jd;kg=Dr;var Y0={usingClientEntryPoint:!1,Events:[Vo,oi,Ol,vg,xg,jd]},Vi={findFiberByHostInstance:Nr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},X0={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Sg(e),e===null?null:e.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||K0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gs.isDisabled&&gs.supportsFiber)try{Ll=gs.inject(X0),Tn=gs}catch{}}Xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y0;Xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rd(t))throw Error(le(200));return q0(e,t,null,n)};Xt.createRoot=function(e,t){if(!Rd(e))throw Error(le(299));var n=!1,r="",i=nv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ld(e,1,!1,null,null,n,!1,r,i),e[Un]=t.current,No(e.nodeType===8?e.parentNode:e),new Ad(t)};Xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(le(188)):(e=Object.keys(e).join(","),Error(le(268,e)));return e=Sg(t),e=e===null?null:e.stateNode,e};Xt.flushSync=function(e){return Dr(e)};Xt.hydrate=function(e,t,n){if(!Wl(t))throw Error(le(200));return Vl(null,e,t,!0,n)};Xt.hydrateRoot=function(e,t,n){if(!Rd(e))throw Error(le(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=nv;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=tv(t,null,e,1,n??null,i,!1,o,s),e[Un]=t.current,No(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Hl(t)};Xt.render=function(e,t,n){if(!Wl(t))throw Error(le(200));return Vl(null,e,t,!1,n)};Xt.unmountComponentAtNode=function(e){if(!Wl(e))throw Error(le(40));return e._reactRootContainer?(Dr(function(){Vl(null,null,e,!1,function(){e._reactRootContainer=null,e[Un]=null})}),!0):!1};Xt.unstable_batchedUpdates=jd;Xt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Wl(n))throw Error(le(200));if(e==null||e._reactInternals===void 0)throw Error(le(38));return Vl(e,t,n,!1,r)};Xt.version="18.3.1-next-f1338f8080-20240426";function rv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rv)}catch(e){console.error(e)}}rv(),rg.exports=Xt;var Q0=rg.exports,iv,Yp=Q0;iv=Yp.createRoot,Yp.hydrateRoot;const zr=6;function Oo(e){return f.jsx("div",{className:"ds-divider",role:"separator","aria-orientation":"vertical",title:e.title,onDoubleClick:e.onReset,onPointerDown:t=>{if(t.button!==0)return;t.preventDefault();const n=t.currentTarget,r=t.clientX,i=e.start();n.setPointerCapture(t.pointerId),n.classList.add("dragging"),document.body.classList.add("ds-resizing");const o=l=>e.onDrag(i,l.clientX-r),s=()=>{n.removeEventListener("pointermove",o),n.removeEventListener("pointerup",s),n.removeEventListener("pointercancel",s),n.classList.remove("dragging"),document.body.classList.remove("ds-resizing"),e.onEnd()};n.addEventListener("pointermove",o),n.addEventListener("pointerup",s),n.addEventListener("pointercancel",s)}})}function ov(e){const[t,n]=T.useState(0);return T.useEffect(()=>{const r=e.current;if(!r)return;const i=new ResizeObserver(()=>n(r.clientWidth));return i.observe(r),n(r.clientWidth),()=>i.disconnect()},[e]),t}async function Ai(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}}/*!
|
|
41
|
+
* Icon paths from Feather (https://github.com/feathericons/feather)
|
|
42
|
+
* The MIT License (MIT)
|
|
43
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
44
|
+
*
|
|
45
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
46
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
47
|
+
* in the Software without restriction, including without limitation the rights
|
|
48
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
49
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
50
|
+
* furnished to do so, subject to the following conditions:
|
|
51
|
+
*
|
|
52
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
53
|
+
* copies or substantial portions of the Software.
|
|
54
|
+
*
|
|
55
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
56
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
57
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
58
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
59
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
60
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
61
|
+
* SOFTWARE.
|
|
62
|
+
*/function Ra({on:e,size:t=14,x:n,y:r}){return f.jsx("svg",{className:`eye${e?" on":""}`,x:n,y:r,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]}):f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})})}function uc({on:e,size:t=14,x:n,y:r}){return f.jsxs("svg",{className:`pin-icon${e?" on":""}`,x:n,y:r,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M8 3h8"}),f.jsx("path",{d:"M9.5 3v6L6 14h12l-3.5-5V3z",fill:e?"currentColor":"none"}),f.jsx("path",{d:"M12 14v7"})]})}function In({size:e=18,x:t,y:n,className:r,children:i}){return f.jsx("svg",{className:r,x:t,y:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i})}function Z0(e){return f.jsxs(In,{...e,children:[f.jsx("circle",{cx:"18",cy:"5",r:"3"}),f.jsx("circle",{cx:"6",cy:"12",r:"3"}),f.jsx("circle",{cx:"18",cy:"19",r:"3"}),f.jsx("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),f.jsx("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})]})}function J0(e){return f.jsxs(In,{...e,children:[f.jsx("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),f.jsx("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),f.jsx("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})]})}function Ri({size:e=14,...t}){return f.jsx(In,{size:e,...t,children:f.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function sv({size:e=14,...t}){return f.jsxs(In,{size:e,...t,children:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function eb({size:e=14,...t}){return f.jsxs(In,{size:e,...t,children:[f.jsx("polyline",{points:"23 4 23 10 17 10"}),f.jsx("polyline",{points:"1 20 1 14 7 14"}),f.jsx("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]})}function tb({size:e=14,...t}){return f.jsx(In,{size:e,...t,children:f.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}function nb({size:e=14,...t}){return f.jsx(In,{size:e,...t,children:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Od(e){return f.jsxs(In,{...e,children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),f.jsx("polyline",{points:"14 2 14 8 20 8"}),f.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),f.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),f.jsx("polyline",{points:"10 9 9 9 8 9"})]})}function rb({size:e=14,...t}){return f.jsxs(In,{size:e,...t,children:[f.jsx("circle",{cx:"11",cy:"11",r:"8"}),f.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function Md({size:e=14,...t}){return f.jsx(In,{size:e,...t,children:f.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Mo({n:e,title:t,className:n}){return f.jsxs("span",{className:`ds-count${n?` ${n}`:""}`,title:t,children:[f.jsx(Ri,{size:12}),e]})}const ib=T.forwardRef(function({value:t,onChange:n,onSave:r,onCancel:i,placeholder:o,autoFocus:s,className:l},a){return f.jsx("textarea",{ref:a,className:l,autoFocus:s,value:t,placeholder:o,onChange:u=>n(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),r()),u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),u.target.blur(),i())}})});function Yt(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}function _t(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function Ko(e){try{localStorage.removeItem(e)}catch{}}function lv(e){try{const t=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);r!=null&&r.startsWith(e)&&t.push(r)}for(const n of t)localStorage.removeItem(n)}catch{}}function Xp(e){const[t,n]=T.useState(()=>{const r=Yt(e,[]);return new Set(Array.isArray(r)?r:[])});return T.useEffect(()=>_t(e,[...t]),[e,t]),[t,n]}function cc(e,t,n){try{return localStorage.getItem(`${e}.${t}`)??n}catch{return n}}function dc(e,t,n){try{localStorage.setItem(`${e}.${t}`,n)}catch{}}function Pd(e){const t=Yt(e,[]);return Array.isArray(t)?t:[]}function Fd(e,t){t.length?_t(e,t):Ko(e)}const Dd=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,av={open:"未対応",partial:"一部解消",updated:"コメント後に変更あり",resolved:"解消済み?"},zd=(e,t)=>`${e}
|
|
63
|
+
${t.trim()}`,Bd=e=>e.length?`${e.join(`
|
|
64
|
+
=====
|
|
65
|
+
`)}
|
|
66
|
+
`:"";function Ud(e){const[t,n]=T.useState(!1),r=async()=>{await e.onCopy(),n(!0),window.setTimeout(()=>n(!1),1600)};return f.jsxs("article",{className:`ds-comment ${e.state}${e.lit?" lit":""}${e.editing?" editing":""}`,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,children:[e.top&&f.jsx("div",{className:"ds-comment-top",children:e.top}),f.jsx("div",{className:"ds-comment-body",children:e.body}),f.jsxs("div",{className:"ds-comment-foot",children:[f.jsx("span",{className:`ds-comment-state ${e.state}`,title:e.stateTitle,children:av[e.state]}),e.ai&&f.jsx("span",{className:"ds-comment-ai",title:`${e.ai} のレビューが付けたコメント`,children:"AI"}),e.meta&&f.jsx("span",{className:"ds-muted",children:e.meta}),f.jsx("span",{className:"ds-spacer"}),f.jsx("button",{className:"ds-link",onClick:()=>void r(),title:"このコメントだけ AI 用にコピー",children:t?"コピーしました":"コピー"}),f.jsx("button",{className:"ds-link",onClick:e.onEdit,children:"編集"}),f.jsx("button",{className:"ds-link danger",onClick:()=>{window.confirm("このコメントを削除しますか?")&&e.onDelete()},children:"削除"})]})]})}const Hd=T.forwardRef(function(t,n){const r=(t.canSave??!0)&&t.value.trim()!=="";return f.jsxs("div",{className:`ds-composer${t.editing?" editing":""}${t.className?` ${t.className}`:""}`,children:[t.top&&f.jsx("div",{className:"ds-composer-top",children:t.top}),f.jsx(ib,{ref:n,className:"ds-composer-input",autoFocus:t.autoFocus,value:t.value,placeholder:t.placeholder,onChange:t.onChange,onSave:()=>r&&t.onSave(),onCancel:t.onCancel}),f.jsxs("div",{className:"ds-composer-foot",children:[f.jsx("span",{className:"ds-muted",children:"⌘ / Ctrl + Enter で保存 ・ Esc でキャンセル"}),f.jsx("span",{className:"ds-spacer"}),(t.showCancel??!0)&&f.jsx("button",{className:"ds-btn",onClick:t.onCancel,children:"キャンセル"}),f.jsx("button",{className:"ds-btn ds-btn-primary",onClick:t.onSave,disabled:!r,children:t.editing?"更新":"保存"})]})]})});function co(e){const t=JSON.stringify(e);let n=5381;for(let r=0;r<t.length;r++)n=(n<<5)+n+t.charCodeAt(r)|0;return(n>>>0).toString(36)}const ob={added:"A",modified:"M",removed:"D",renamed:"R",unchanged:""},Qp={added:"追加",modified:"変更",removed:"削除",renamed:"名前の変更",unchanged:"変更なし"};function ji({status:e,small:t=!1,title:n}){const r=n===null?void 0:n??Qp[e];return f.jsx("span",{className:`ds-st ${e}${t?" small":""}`,title:r,"aria-label":Qp[e],children:ob[e]})}const Zp=[["added","追加"],["modified","変更"],["removed","削除"]];function Wd({stats:e,unit:t,showZero:n=!1}){const r=Zp.filter(([o])=>n||e[o]>0);if(r.length===0)return null;const i=Zp.map(([o,s])=>`${s} ${e[o]}`).join("・")+` ${t}`;return f.jsx("span",{className:"ds-status",title:i,children:r.map(([o])=>f.jsxs("span",{className:`ds-status-n ${o}${e[o]===0?" zero":""}`,children:[f.jsx(ji,{status:o,small:!0,title:null}),e[o]]},o))})}function Oi({stats:e,title:t,showZero:n=!1}){const r=[["added","+",e.added],["removed","−",e.removed]];e.modified!==void 0&&r.push(["modified","~",e.modified]);const i=r.filter(([,,o])=>n||o>0);return i.length===0?null:f.jsx("span",{className:"ds-change",title:t,children:i.map(([o,s,l])=>f.jsxs("span",{className:l?o:"zero",children:[s,l]},o))})}function Vd({children:e}){return f.jsx("header",{className:"ds-bar",children:e})}function qd({children:e}){return f.jsx("span",{className:"ds-bar-counts",children:e})}function _i({children:e}){return f.jsx("span",{className:"ds-bar-label",children:e})}function Kd(){return f.jsx("span",{className:"ds-bar-sep"})}function Gd(){return f.jsx("span",{className:"ds-bar-spacer"})}function Yd({done:e,total:t,title:n}){return t===0?null:f.jsxs("span",{className:"ds-progress",title:n,children:[f.jsxs("span",{children:["確認済み ",e," / ",t]}),f.jsx("span",{className:"ds-progress-bar",children:f.jsx("span",{style:{width:`${e/t*100}%`}})})]})}const Br=5e3;function Xd(e){const[t,n]=T.useState(!1),[r,i]=T.useState(""),[o,s]=T.useState(!1),[l,a]=T.useState({index:0,seq:0}),u=T.useRef(null),c=T.useRef(t);c.current=t;const[d,h]=T.useState(0);T.useEffect(()=>{var v,m;d&&((v=u.current)==null||v.focus(),(m=u.current)==null||m.select())},[d]),T.useEffect(()=>{if(!e)return;const v=m=>{if(!(m.metaKey||m.ctrlKey)||m.altKey)return;const g=m.key.toLowerCase();if(g==="f"&&!m.shiftKey){if(document.activeElement===u.current)return;m.preventDefault(),n(!0),h(w=>w+1)}else g==="g"&&c.current&&(m.preventDefault(),a(w=>({index:w.index+(m.shiftKey?-1:1),seq:w.seq+1})))};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const p=T.useCallback(v=>{i(v),a(m=>({index:0,seq:m.seq+1}))},[]),y=T.useCallback(()=>{s(v=>!v),a(v=>({index:0,seq:v.seq+1}))},[]),x=T.useCallback((v,m)=>{m!==0&&a(g=>({index:((g.index+v)%m+m)%m,seq:g.seq+1}))},[]),S=T.useCallback(()=>n(!1),[]);return{open:t,query:r,caseSensitive:o,index:l.index,seq:l.seq,input:u,setQuery:p,toggleCase:y,go:x,close:S}}const ql=(e,t)=>t===0?-1:(e.index%t+t)%t;function Qd(e,t,n,r=Br){if(!t)return[];const i=n?e:e.toLowerCase(),o=n?t:t.toLowerCase(),s=[];for(let l=i.indexOf(o);l!==-1&&s.length<r;l=i.indexOf(o,l+o.length))s.push(l);return s}function Zd({find:e,count:t,placeholder:n}){if(!e.open)return null;const r=t>=Br,i=ql(e,t);return f.jsxs("div",{className:"ds-find",role:"search",children:[f.jsx(rb,{size:14,className:"ds-find-icon"}),f.jsx("input",{ref:e.input,className:"ds-find-input",type:"text",placeholder:n,value:e.query,spellCheck:!1,onChange:o=>e.setQuery(o.target.value),onKeyDown:o=>{o.nativeEvent.isComposing||o.keyCode===229||(o.key==="Enter"?(o.preventDefault(),e.go(o.shiftKey?-1:1,t)):o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),e.close()))}}),f.jsx("button",{className:`ds-find-btn ds-find-case${e.caseSensitive?" on":""}`,onClick:e.toggleCase,title:"大文字と小文字を区別する","aria-pressed":e.caseSensitive,children:"Aa"}),f.jsx("span",{className:`ds-find-count${e.query&&t===0?" none":""}`,children:e.query?t===0?"0 件":`${i+1} / ${t}${r?"+":""}`:""}),f.jsx("button",{className:"ds-find-btn",onClick:()=>e.go(-1,t),disabled:t===0,title:"前へ(Shift+Enter)","aria-label":"前へ",children:"↑"}),f.jsx("button",{className:"ds-find-btn",onClick:()=>e.go(1,t),disabled:t===0,title:"次へ(Enter)","aria-label":"次へ",children:"↓"}),f.jsx("button",{className:"ds-find-btn",onClick:e.close,title:"閉じる(Esc)","aria-label":"閉じる",children:"×"})]})}const Jp="ds-find",Oa="ds-find-current";let ys=null,tn=null;const eh=()=>typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u";function Jd(e){const{root:t,selector:n,find:r,on:i}=e,o=T.useRef(e.current);o.current=e.current;const s=r.open&&i?r.query:"",l=r.caseSensitive,a=r.seq;T.useEffect(()=>{if(!t||!s)return;const u={};ys=u;let c=0;const d=()=>{if(ys!==u)return;const y=o.current();if(tn!==((y==null?void 0:y.el)??null)&&(tn==null||tn.removeAttribute("data-find-current"),tn=(y==null?void 0:y.el)??null,tn==null||tn.setAttribute("data-find-current","")),!eh())return;const x=[];let S=null;for(const v of t.querySelectorAll(n)){if(x.length>=Br)break;const m=th(v,s,l);x.push(...m),y&&v===y.el&&(S=m[y.nth]??null)}y&&!S&&(S=th(y.el,s,l)[y.nth]??null),CSS.highlights.set(Jp,new Highlight(...x)),S?CSS.highlights.set(Oa,new Highlight(S)):CSS.highlights.delete(Oa)},h=()=>{cancelAnimationFrame(c),c=requestAnimationFrame(d)};d();const p=new MutationObserver(h);return p.observe(t,{subtree:!0,childList:!0,characterData:!0}),()=>{p.disconnect(),cancelAnimationFrame(c),ys===u&&(ys=null,tn==null||tn.removeAttribute("data-find-current"),tn=null,eh()&&(CSS.highlights.delete(Jp),CSS.highlights.delete(Oa)))}},[t,n,s,l,a])}function th(e,t,n){const r=[],i=[];let o="";const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(let c=s.nextNode();c;c=s.nextNode())r.push(c),i.push(o.length),o+=c.data;const l=[];let a=0;const u=(c,d)=>{for(;a+1<r.length&&(d?i[a+1]<c:i[a+1]<=c);)a++;return[r[a],c-i[a]]};for(const c of Qd(o,t,n)){const d=document.createRange(),[h,p]=u(c,!1);d.setStart(h,p);const[y,x]=u(c+t.length,!0);d.setEnd(y,x),l.push(d)}return l}const sb={review:{agent:"",by:{}},fix:{agent:"",by:{}},scope:"current"},Gr=e=>e&&typeof e=="object"?e:{},Ma=e=>typeof e=="string"?e:"";function lb(e){const t=r=>({agent:Ma(Gr(r).agent),by:Object.fromEntries(Object.entries(Gr(Gr(r).by)).map(([i,o])=>[i,{model:Ma(Gr(o).model),effort:Ma(Gr(o).effort)}]))}),n=Gr(e);return{review:t(n.review),fix:t(n.fix),scope:n.scope==="all"?"all":"current"}}const uv=(e,t)=>{var n;return((n=e.models.find(r=>r.id===t))==null?void 0:n.efforts)??e.defaultEfforts};function fc(e,t){const n=t.find(s=>s.id===e.agent)??t[0];if(!n)return null;const r=e.by[n.id]??{model:"",effort:""},i=n.models.some(s=>s.id===r.model)?r.model:"",o=uv(n,i).includes(r.effort)?r.effort:"";return{agent:n,model:i,effort:o}}const Pa=(e,t,n)=>({agent:t,by:{...e.by,[t]:{...e.by[t]??{model:"",effort:""},...n}}});function cv(e,t){const n=t.filter(r=>r.comments.trim()).map(r=>`## ${r.heading}
|
|
67
|
+
|
|
68
|
+
${r.comments.trimEnd()}`);return[...e.range?[e.range]:[],...n].join(`
|
|
69
|
+
|
|
70
|
+
`)+`
|
|
71
|
+
`}function ab(e,t){return["各指摘に対応してください。","","- 作業ディレクトリのファイルを直接編集してください。","- コミットやステージ(git add)はしないでください。","- 指摘と関係のない変更はしないでください。","- 最後に、何を変えたかを短く報告してください。対応しなかった指摘があれば、その理由も書いてください。","",cv(e,t)].join(`
|
|
72
|
+
`)}function ub(e){return e.baseRev===null?"`git diff`(ステージ済みの状態と作業ディレクトリの差分)":`\`git diff ${e.baseRev}\`(まだ git に追加していない新しいファイルはこの差分に出ません。下の一覧にあるものは直接読んでください)`}function cb(e,t){const n=["あなたはコードレビュアーです。git の差分のレビュービューア diffshape から呼ばれています。次の変更をレビューして、指摘をコメントとして返してください。",`比較: ${e.targetLabel} と ${e.baseLabel} の差分`,`差分の見方: ${ub(e)}`,"","## 決まり","","- 読むだけにしてください。ファイルの変更、コミット、ステージはしないでください。","- 直す価値のある指摘だけを書いてください(バグ、考慮漏れ、既存の作りとの食い違い、危険な変更など)。好みの問題や細かい書き方の指摘は要りません。問題がなければ comments は空の配列にしてください。","- 1つの指摘を1つのコメントにしてください。","- 「既に付いているコメント」と同じ指摘は書かないでください。","- 各コメントの module には、下の見出しにある module の値を入れてください。コメントの付け方は見出しごとに違います。使わない項目は null にしてください。",""];for(const r of t)n.push(`## ${r.heading}(module: "${r.id}")`,"",(r.review??"").trimEnd(),""),r.comments.trim()&&n.push("既に付いているコメント:","",r.comments.trimEnd(),"");return n.join(`
|
|
73
|
+
`).trimEnd()+`
|
|
74
|
+
`}function db(e){const t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function fb(e,t){if(e===0&&t===0)return"指摘はありませんでした";const n=t?`(${t} 件は指している場所が見つからず、追加していません)`:"";return e?`コメントを ${e} 件追加しました${n}`:`コメントは追加していません${n}`}const pb=e=>e.split(/(`[^`\n]*`)/).map((t,n)=>n%2?t:t.replace(/\[([^\]\n]+)\]\([^)\n]*\)/g,"$1")).join(""),nh="diffshape.ai",vs="diffshape.ai.seen",rh={review:"レビュー",fix:"修正"};async function Fa(e,t){const n=await fetch(e,t===void 0?void 0:{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await n.text());return await n.json()}const ih=e=>e instanceof Error?e.message:String(e);function hb({info:e,modules:t,current:n,reports:r,acks:i,onBatch:o,onReload:s,onFixing:l,flash:a}){var de,_e;const[u,c]=T.useState(null),[d,h]=T.useState(!1),[p,y]=T.useState(()=>lb(Yt(nh,sb))),[x,S]=T.useState(null),[v,m]=T.useState(null),[g,w]=T.useState(null),$=T.useRef(!1),k=fe=>{y(fe),_t(nh,fe)},_=T.useCallback(()=>Fa("/api/agent").then(c,()=>{}),[]);T.useEffect(()=>void _(),[_]);const N=(u==null?void 0:u.job)??null,D=(N==null?void 0:N.status)==="running";T.useEffect(()=>{if(!D)return;const fe=window.setTimeout(()=>void _(),1e3);return()=>window.clearTimeout(fe)},[D,u,_]),T.useEffect(()=>l(D&&(N==null?void 0:N.kind)==="fix"),[D,N==null?void 0:N.kind,l]);const E=T.useMemo(()=>t.filter(fe=>{var ye;return(ye=r[fe.id])==null?void 0:ye.review}),[t,r]),O=fe=>p.scope==="all"?fe:fe.filter(ye=>ye===n),C=O(E),A=O(t.filter(fe=>{var ye;return(((ye=r[fe.id])==null?void 0:ye.open)??0)>0})),R=A.reduce((fe,ye)=>fe+r[ye.id].open,0),q=fe=>{var ye,Te,ce;return{id:fe.id,heading:fe.heading,review:(Te=(ye=r[fe.id])==null?void 0:ye.review)==null?void 0:Te.call(ye),comments:(((ce=r[fe.id])==null?void 0:ce.open)??0)>0?r[fe.id].prompt():""}},B=(u==null?void 0:u.agents)??[],V={review:fc(p.review,B),fix:fc(p.fix,B)},z=async(fe,ye)=>{const Te=V[fe];if(Te){S(null),m(null);try{const ce=await Fa("/api/agent/start",{kind:fe,agent:Te.agent.id,prompt:ye,model:Te.model,effort:Te.effort});c(M=>M&&{...M,job:ce})}catch(ce){$.current=!1,S(ih(ce))}}},U=fe=>{const ye=C.map(q).filter(Te=>{var ce;return(ce=Te.review)==null?void 0:ce.trim()});if(ye.length===0)return S("レビューする変更がありません");$.current=fe,z("review",cb(e,ye))},b=()=>void z("fix",ab(e,A.map(q))),Q=T.useRef(b);Q.current=b;const H=()=>{$.current=!1,Fa("/api/agent/cancel",{}).then(_,fe=>S(ih(fe)))},j=T.useRef(Yt(vs,""));T.useEffect(()=>{var J,ee;if(!N||N.status==="running")return;const fe=`${N.id}:${N.startedAt}`;if(j.current===fe)return;j.current=fe;const ye=((J=B.find(he=>he.id===N.agent))==null?void 0:J.label)??N.agent,Te=he=>{m(he),a(he)};if(N.kind==="review"){const he=$.current;if($.current=!1,N.status!=="done")return _t(vs,fe),Te(N.status==="cancelled"?"レビューを中止しました":`レビューできませんでした: ${N.error??""}`);const ge=N.comments??[],xe=E.map(Oe=>Oe.id);if(xe.length===0){j.current="",$.current=he;return}_t(vs,fe),o({seq:N.startedAt,agent:ye,items:ge}),w({seq:N.startedAt,ids:xe,other:ge.filter(Oe=>!xe.includes(Oe.module)).length,chain:he});return}_t(vs,fe);const ce=((ee=N.changedFiles)==null?void 0:ee.length)??0,M=N.status==="done"?"修正が終わりました":N.status==="cancelled"?"修正を中止しました":`修正できませんでした: ${N.error??""}`;(ce||N.status==="done"?s():Promise.resolve()).then(()=>Te(`${M}(変更 ${ce} ファイル)`))},[N,B,E,o,s,a]);const[P,L]=T.useState(0);T.useEffect(()=>{if(!g)return;const fe=window.setTimeout(()=>L(g.seq),1e4);return()=>window.clearTimeout(fe)},[g]),T.useEffect(()=>{if(!g)return;const fe=g.ids.filter(M=>{var J;return((J=i[M])==null?void 0:J.seq)===g.seq});if(fe.length<g.ids.length&&P!==g.seq)return;w(null);const ye=fe.reduce((M,J)=>M+i[J].placed,0),Te=fe.reduce((M,J)=>M+i[J].dropped,0)+g.other,ce=fb(ye,Te);if(g.chain&&R>0)a(ce),Q.current();else{const M=g.chain?"。直すコメントがないので、修正はしていません":"";m(ce+M),a(ce+M)}},[g,i,P,R,a]);const F=T.useRef(null);if(T.useEffect(()=>{if(!d)return;const fe=Te=>{F.current&&!F.current.contains(Te.target)&&h(!1)},ye=Te=>{Te.key==="Escape"&&h(!1)};return document.addEventListener("mousedown",fe),document.addEventListener("keydown",ye),()=>{document.removeEventListener("mousedown",fe),document.removeEventListener("keydown",ye)}},[d]),!(u!=null&&u.available))return null;const K=D||!!g,Z=N&&D?db(Date.now()-N.startedAt):"",te=C.length===0?p.scope==="current"?`${n.title}の画面は、まだ AI レビューに対応していません`:"AI レビューに対応した画面がありません":void 0,ie=R===0?"未対応のコメントがありません":void 0;return f.jsxs("div",{className:"ai",ref:F,children:[f.jsxs("button",{className:`ds-btn${d?" on":""}`,onClick:()=>h(fe=>!fe),"aria-expanded":d,title:"AI にレビューや修正をさせる(Claude Code / Codex)",children:[f.jsx(tb,{size:13,className:D?"ai-pulse":void 0}),D&&N?`AI ${rh[N.kind]}中 ${Z}`:"AI"]}),d&&f.jsxs("div",{className:"ai-panel",role:"dialog","aria-label":"AI レビューと修正",children:[t.length>1&&f.jsxs("div",{className:"ai-row",children:[f.jsx("span",{className:"ai-label",children:"範囲"}),f.jsx("div",{className:"ds-seg",role:"radiogroup","aria-label":"範囲",children:[["current",`この画面(${n.title})`],["all","すべて"]].map(([fe,ye])=>f.jsx("button",{role:"radio","aria-checked":p.scope===fe,className:p.scope===fe?"on":"",disabled:K,onClick:()=>k({...p,scope:fe}),children:ye},fe))})]}),f.jsx(oh,{label:"レビュー",agents:B,choice:p.review,disabled:K,onChange:fe=>k({...p,review:fe})}),f.jsx(oh,{label:"修正",agents:B,choice:p.fix,disabled:K,onChange:fe=>k({...p,fix:fe})}),f.jsxs("div",{className:"ai-actions",children:[f.jsx("button",{className:"ds-btn",disabled:K||!!te,title:te??"差分を読んでコメントを付けます(ファイルは変えません)",onClick:()=>U(!1),children:"レビュー"}),f.jsxs("button",{className:"ds-btn",disabled:K||!!ie,title:ie??"未対応のコメントに対応するよう、作業ディレクトリのファイルを編集します",onClick:b,children:["修正",R>0?`(${R})`:""]}),f.jsx("button",{className:"ds-btn ds-btn-primary",disabled:K||!!te,title:te??"レビューして、付いたコメントを続けて修正します",onClick:()=>U(!0),children:"レビューして修正"})]}),x&&f.jsx("div",{className:"ai-error",children:x}),D&&N&&f.jsxs("div",{className:"ai-run",children:[f.jsxs("div",{className:"ai-run-head",children:[f.jsxs("span",{children:[((de=B.find(fe=>fe.id===N.agent))==null?void 0:de.label)??N.agent," が",rh[N.kind],"中… ",Z]}),f.jsx("span",{className:"shell-spacer"}),f.jsx("button",{className:"ds-btn",onClick:H,children:"中止"})]}),f.jsx(mb,{lines:N.log})]}),!D&&g&&f.jsx("div",{className:"ai-outcome",children:"コメントを置いています…"}),!K&&v&&f.jsxs("div",{className:"ai-outcome",children:[f.jsx("div",{children:v}),(N==null?void 0:N.kind)==="fix"&&N.text&&f.jsx("div",{className:"ai-said",children:pb(N.text)}),(N==null?void 0:N.kind)==="fix"&&N.snapshot&&(((_e=N.changedFiles)==null?void 0:_e.length)??0)>0&&f.jsx(gb,{command:`diffshape . ${N.snapshot}`})]})]})]})}function oh({label:e,agents:t,choice:n,disabled:r,onChange:i}){var l;const o=fc(n,t);if(!o)return null;const s=uv(o.agent,o.model);return f.jsxs("div",{className:"ai-row",children:[f.jsx("span",{className:"ai-label",children:e}),f.jsx("select",{className:"ds-select","aria-label":`${e}のエージェント`,value:o.agent.id,disabled:r||t.length<2,onChange:a=>i(Pa(n,a.target.value,{})),children:t.map(a=>f.jsx("option",{value:a.id,title:a.version?`${a.label} ${a.version}`:a.label,children:a.label},a.id))}),f.jsxs("select",{className:"ds-select ai-model","aria-label":`${e}のモデル`,value:o.model,disabled:r||o.agent.models.length===0,title:((l=o.agent.models.find(a=>a.id===o.model))==null?void 0:l.description)??`${o.agent.label}${o.agent.version?` ${o.agent.version}`:""} の設定どおり`,onChange:a=>i(Pa(n,o.agent.id,{model:a.target.value})),children:[f.jsx("option",{value:"",children:"既定のモデル"}),o.agent.models.map(a=>f.jsx("option",{value:a.id,children:a.label},a.id))]}),f.jsxs("select",{className:"ds-select","aria-label":`${e}の Effort`,value:o.effort,disabled:r||s.length===0,title:"考える深さ(Effort)",onChange:a=>i(Pa(n,o.agent.id,{effort:a.target.value})),children:[f.jsx("option",{value:"",children:"既定の Effort"}),s.map(a=>f.jsx("option",{value:a,children:a},a))]})]})}function mb({lines:e}){const t=T.useRef(null);return T.useEffect(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[e.length]),f.jsx("div",{className:"ai-log",ref:t,children:e.length===0?f.jsx("div",{className:"shell-muted",children:"開始しています…"}):e.map((n,r)=>f.jsx("div",{children:n},r))})}function gb({command:e}){const[t,n]=T.useState(!1);return f.jsxs("div",{className:"ai-snapshot",children:[f.jsx("span",{className:"shell-muted",children:"AI の変更だけを見る:"}),f.jsx("code",{children:e}),f.jsx("button",{className:"ds-link",onClick:()=>void Ai(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1600)}),children:t?"コピーしました":"コピー"})]})}function ef(e){var n;if(e.kind==="option")return`--schema ${e.patterns.join(" ")}`;const t=((n=e.envs)==null?void 0:n.filter(Boolean))??[];return`${e.configs.join(", ")}${t.length?`(env: ${t.join(", ")})`:""} の src`}const Bs=e=>e.diff.tables.length+e.diff.values.length+e.diff.enums.length+e.diff.domains.length,tf="dbshape.reviewed:",yb=e=>Yt(tf+e,{}),vb=(e,t)=>_t(tf+e,t),nf=e=>`${e.repoRoot}|${e.baseLabel}|${e.targetLabel}|`,xb=e=>lv(tf+nf(e)),dv=e=>`カラム・制約・インデックス:追加 ${e.added}・削除 ${e.removed}・変更 ${e.modified}`;function fv(e){const t={added:0,removed:0,modified:0};for(const n of[...e.columns,...e.constraints,...e.indexes])t[n.status]++;return e.comment&&e.status==="modified"&&t.modified++,t}function wb(e){const t=new Map,n=r=>{let i=t.get(r);return i||t.set(r,i={primary:!1,unique:!1,references:[]}),i};for(const r of e)r.kind==="primary"&&r.columns.forEach(i=>n(i).primary=!0),r.kind==="unique"&&r.columns.length===1&&(n(r.columns[0]).unique=!0),r.kind==="foreign"&&r.references&&r.columns.length===1&&n(r.columns[0]).references.push({table:r.references.table,columns:r.references.columns}),r.kind==="check"&&r.values&&(n(r.values.column).values=r.values.values);return t}function kb(e){var n;return[...e.constraints.map(r=>r.after??(e.status==="removed"?r.before:void 0)).filter(r=>!!r),...((n=e.unchanged)==null?void 0:n.constraints)??[]]}function Kl(e,t){const n=new Set(e??[]),r=new Set(t??[]);return[...(t??[]).map(i=>({value:i,status:e&&!n.has(i)?"added":"same"})),...(e??[]).filter(i=>!r.has(i)).map(i=>({value:i,status:"removed"}))]}function pv(e){return e.source==="check"?{label:`${e.table}.${e.column}`,table:e.table}:{label:e.type??""}}function pc(e){const t=[{key:"type",text:e.type}];return t.push({key:"notNull",text:e.notNull?"NOT NULL":"NULL"}),e.default!==void 0&&t.push({key:"default",text:`DEFAULT ${e.default}`}),e.identity&&t.push({key:"identity",text:`IDENTITY ${e.identity==="always"?"ALWAYS":"BY DEFAULT"}`}),e.generated&&t.push({key:"generated",text:`GENERATED (${e.generated})`}),t}function fo(e){return`${e.method?`USING ${e.method} `:""}(${e.columns.join(", ")})${e.include?` INCLUDE (${e.include.join(", ")})`:""}${e.where?` WHERE ${e.where}`:""}`}function bb(e){return`${e.unique?"UNIQUE ":""}INDEX ${fo(e)}`}function Eb(e,t){const n=t.trim().toLowerCase();return n?e.name.toLowerCase().includes(n)||e.columns.some(r=>r.name.toLowerCase().includes(n)):!0}function Sb(e,t,n,r,i=1/0){const o=[];if(!n)return o;const s=r?n:n.toLowerCase(),l=a=>(r?a:a.toLowerCase()).includes(s);for(const a of e){l(a.name)&&o.push({kind:"table",table:a.name});for(const u of a.columns)l(u.name)&&o.push({kind:"column",table:a.name,column:u.name});if(o.length>=i)return o.slice(0,i)}for(const a of t)l(a)&&o.push({kind:"type",name:a});return o.slice(0,i)}const Ur=e=>`${e.kind}:${e.table??""}:${e.name}`,gl=e=>({kind:"table",table:e,name:e});function hv(e){switch(e.kind){case"table":case"type":return e.name;case"column":case"value":return`${e.table}.${e.name}`;default:return`${e.table}:${e.name}`}}const Us={table:"テーブル",column:"カラム",constraint:"制約",index:"インデックス",value:"値",type:"型"};function Po(e){return e.kind==="table"||e.kind==="type"?`${Us[e.kind]} ${e.name}`:e.kind==="column"||e.kind==="value"?`${Us[e.kind]} ${e.table}.${e.name}`:`${Us[e.kind]} ${e.table} の ${e.name}`}function Cb(e){return e.kind==="table"?"テーブル全体":e.kind==="type"?e.name:`${Us[e.kind]} ${e.name}`}const nn={added:"今回追加",removed:"今回削除",modified:"今回変更"},Da=e=>pc(e).filter(t=>t.key!=="notNull"||e.notNull).map(t=>t.text).join(" "),za=e=>bb(e);function Nb(e){if(e.status!=="modified")return nn[e.status];const t=[],n=(r,i)=>{const o=r.filter(u=>u.status==="added").length,s=r.filter(u=>u.status==="removed").length,l=r.filter(u=>u.status==="modified").length,a=[o&&`+${o}`,s&&`−${s}`,l&&`~${l}`].filter(Boolean).join(" ");a&&t.push(`${i} ${a}`)};return n(e.columns,"カラム"),n(e.constraints,"制約"),n(e.indexes,"インデックス"),e.comment&&t.push("コメント"),`${nn.modified}(${t.join("、")})`}function Gl(e,t){const n=e.diff,r=t.table?n.tables.find(i=>i.name===t.table):void 0;switch(t.kind){case"table":return r?Nb(r):void 0;case"column":{const i=r==null?void 0:r.columns.find(o=>o.name===t.name);return i?i.status!=="modified"?`${nn[i.status]}: ${Da(i.after??i.before)}`:`${nn.modified}: ${Da(i.before)} → ${Da(i.after)}`:void 0}case"constraint":{const i=r==null?void 0:r.constraints.find(o=>o.name===t.name);return i?i.status!=="modified"?`${nn[i.status]}: ${(i.after??i.before).definition}`:`${nn.modified}: ${i.before.definition} → ${i.after.definition}`:void 0}case"index":{const i=r==null?void 0:r.indexes.find(o=>o.name===t.name);return i?i.status!=="modified"?`${nn[i.status]}: ${za(i.after??i.before)}`:`${nn.modified}: ${za(i.before)} → ${za(i.after)}`:void 0}case"value":{const i=n.values.find(o=>o.source==="check"&&o.table===t.table&&o.column===t.name);return i?sh(i):void 0}case"type":{const i=n.enums.find(l=>l.name===t.name);if(i){if(i.status!=="modified")return`${nn[i.status]}: ENUM (${(i.after??i.before).values.join(", ")})`;const l=n.values.find(a=>a.type===t.name);return l?`値の変更: ${sh(l)}`:nn.modified}const o=n.domains.find(l=>l.name===t.name);if(!o)return;const s=l=>`${l.type}${l.notNull?" NOT NULL":""}${l.checks.map(a=>` ${a.definition}`).join("")}`;return o.status!=="modified"?`${nn[o.status]}: DOMAIN ${s(o.after??o.before)}`:`${nn.modified}: ${s(o.before)} → ${s(o.after)}`}}}function sh(e){return e.status==="added"?`値の制限を追加(${(e.after??[]).join(", ")})`:e.status==="removed"?`値の制限を削除(変更前: ${(e.before??[]).join(", ")})`:`${[...e.added.map(n=>`+${n}`),...e.removed.map(n=>`−${n}`)].join(" ")}(変更後: ${(e.after??[]).join(", ")})`}function mv(e,t){if(t.kind==="value"){const n=e.diff.values.find(r=>r.source==="check"&&r.table===t.table&&r.column===t.name);if(n!=null&&n.constraint){const r=e.locations[`${t.table}:${n.constraint}`];if(r)return r}}return e.locations[hv(t)]}function gv(e,t){const n=e.locations[hv(t)];return!!n&&!n.base}function po(e,t){const n=Gl(e,t.target);return!gv(e,t.target)&&!n||t.snapshot!==void 0&&n===void 0?"resolved":n!==t.snapshot?"updated":"open"}function yv(e,t,n){return{id:Dd(),target:t,body:n,createdAt:Date.now(),snapshot:Gl(e,t)}}const jb=e=>`${e.file}:L${e.line}${e.base?" (old)":""}`;function vv(e,t,n={}){const r=n.includeResolved?t:t.filter(o=>po(e,o)!=="resolved"),i=r.map(o=>{const s=mv(e,o.target);return zd(s?`${jb(s)} ${Po(o.target)}`:Po(o.target),o.body)});return{text:Bd(i),included:r.length,skipped:t.length-r.length}}const rf="dbshape.comments:",_b=e=>Pd(rf+e),lh=(e,t)=>Fd(rf+e,t),$b=e=>lv(rf+nf(e)),xv=T.createContext(null),of=()=>T.useContext(xv),Tb=av;function hr({target:e,label:t}){const n=of();if(!n)return null;const r=Ur(e),i=n.comments.filter(o=>Ur(o.target)===r).length;return f.jsxs("button",{className:`cbtn ${i?"has":""}`,onClick:o=>{o.stopPropagation(),n.compose(e)},title:`${t??Cb(e)} にコメントする`,"aria-label":"コメントする",children:[f.jsx(Ri,{size:12}),i>0&&f.jsx("span",{className:"cnum",children:i})]})}function Vn({target:e,colSpan:t}){const n=of();if(!n)return null;const r=Ur(e),i=n.comments.filter(s=>Ur(s.target)===r),o=n.composing===r;return!i.length&&!o?null:t?f.jsx("tr",{className:"thread-row",children:f.jsx("td",{colSpan:t,children:f.jsx(Vn,{target:e})})}):f.jsxs("div",{className:"thread",id:`c-${r}`,children:[i.map(s=>n.editing===s.id?f.jsx(ah,{initial:s.body,onSave:l=>n.update(s.id,l),onCancel:()=>n.edit(null)},s.id):f.jsx(Lb,{c:s},s.id)),o&&f.jsx(ah,{initial:"",onSave:s=>n.add(e,s),onCancel:()=>n.compose(null)})]})}function Lb({c:e}){const t=of(),n=po(t.data,e);return f.jsx(Ud,{body:e.body,state:n,ai:e.ai,stateTitle:n==="updated"?`コメントしたときは: ${e.snapshot??"変更なし"}`:n==="resolved"?"対象がなくなったか、比較元と同じに戻りました":void 0,onCopy:()=>Ai(vv(t.data,[e],{includeResolved:!0}).text),onEdit:()=>t.edit(e.id),onDelete:()=>t.remove(e.id)})}function ah({initial:e,onSave:t,onCancel:n}){const[r,i]=T.useState(e);return f.jsx(Hd,{autoFocus:!0,editing:e!=="",value:r,placeholder:"気になる点や直してほしいこと",onChange:i,onSave:()=>r.trim()&&t(r.trim()),onCancel:n})}function Ib({table:e,reviewed:t,onReviewed:n,known:r,onJump:i,highlighted:o,alwaysOpen:s}){const[l,a]=T.useState(!t),[u,c]=T.useState(!1),d=fv(e),h=wb(kb(e)),p=s||l;return f.jsxs("section",{id:`table-${e.name}`,className:`card ${e.status} ${o?"highlighted":""} ${t&&!s?"reviewed":""}`,children:[f.jsxs("header",{className:"card-head",children:[!s&&f.jsx("button",{className:"fold",onClick:()=>a(!p),"aria-label":p?"たたむ":"開く","aria-expanded":p,children:p?"▾":"▸"}),f.jsxs("span",{className:"tname",children:[f.jsxs("span",{className:"schema",children:[e.schema,"."]}),e.table]}),f.jsx(Oi,{stats:d,title:dv(d)}),f.jsx("span",{className:"file",title:e.file,children:e.file}),f.jsx(hr,{target:gl(e.name),label:"テーブル全体"}),f.jsxs("label",{className:"reviewed-box",title:"確認済みにすると、図と一覧で薄く表示します(テーブルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t,onChange:y=>{n(y.target.checked),a(!y.target.checked)}}),"確認済み"]})]}),p&&f.jsxs("div",{className:"card-body",children:[f.jsx(Vn,{target:gl(e.name)}),e.comment&&f.jsx(Pb,{before:e.comment.before,after:e.comment.after,status:e.status}),e.status==="modified"?f.jsxs(f.Fragment,{children:[f.jsx(qi,{title:"カラム",empty:e.columns.length===0,children:f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(y=>f.jsx(Rb,{table:e.name,change:y,badges:h.get(y.name),known:r,onJump:i},y.name))})})}),f.jsx(qi,{title:"制約",empty:e.constraints.length===0,children:e.constraints.map(y=>f.jsx(Ob,{table:e.name,change:y,known:r,onJump:i},y.name))}),f.jsx(qi,{title:"インデックス",empty:e.indexes.length===0,children:e.indexes.map(y=>f.jsx(Mb,{table:e.name,change:y},y.name))}),e.unchanged&&(e.unchanged.columns.length>0||e.unchanged.constraints.length>0||e.unchanged.indexes.length>0)&&f.jsxs("div",{className:"context",children:[f.jsxs("button",{className:"link",onClick:()=>c(!u),children:[u?"▾":"▸"," 変更のないカラム ",e.unchanged.columns.length,"・制約 ",e.unchanged.constraints.length,"・インデックス ",e.unchanged.indexes.length]}),u&&f.jsxs("div",{className:"context-body",children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.unchanged.columns.map(y=>f.jsx(hc,{table:e.name,c:y,badges:h.get(y.name),known:r,onJump:i},y.name))})}),e.unchanged.constraints.map(y=>f.jsx(uh,{table:e.name,c:y,known:r,onJump:i},y.name)),e.unchanged.indexes.map(y=>f.jsx(ch,{table:e.name,i:y},y.name))]})]})]}):f.jsxs(f.Fragment,{children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(y=>f.jsx(hc,{table:e.name,c:y.after??y.before,badges:h.get(y.name),known:r,onJump:i},y.name))})}),e.constraints.length>0&&f.jsx(qi,{title:"制約",children:e.constraints.map(y=>f.jsx(uh,{table:e.name,c:y.after??y.before,known:r,onJump:i},y.name))}),e.indexes.length>0&&f.jsx(qi,{title:"インデックス",children:e.indexes.map(y=>f.jsx(ch,{table:e.name,i:y.after??y.before},y.name))})]})]})]})}function qi(e){return e.empty?null:f.jsxs("div",{className:"section",children:[f.jsx("div",{className:"section-title",children:e.title}),e.children]})}const wv={added:"+",removed:"−",modified:"~"};function kv({b:e,known:t,onJump:n}){return e?f.jsxs(f.Fragment,{children:[e.primary&&f.jsx("span",{className:"tag key",children:"PK"}),e.unique&&f.jsx("span",{className:"tag",children:"UNIQUE"}),e.references.map(r=>f.jsx(Ab,{table:r.table,columns:r.columns,known:t,onJump:n},r.table))]}):null}function Ab({table:e,columns:t,known:n,onJump:r}){const i=`→ ${e}${t.length?` (${t.join(", ")})`:""}`;return n.has(e)?f.jsx("button",{className:"tag ref link",onClick:()=>r(e),title:"このテーブルの変更へ移動",children:i}):f.jsx("span",{className:"tag ref",children:i})}const bv=(e,t)=>({kind:"column",table:e,name:t});function hc({table:e,c:t,badges:n,known:r,onJump:i}){const o=bv(e,t.name);return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:"plain",children:[f.jsx("td",{className:"mark"}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[f.jsx("code",{children:t.type}),t.notNull&&f.jsx("span",{className:"attr",children:"NOT NULL"}),t.default!==void 0&&f.jsxs("span",{className:"attr",children:["DEFAULT ",t.default]}),t.identity&&f.jsx("span",{className:"attr",children:"IDENTITY"}),t.generated&&f.jsxs("span",{className:"attr",children:["GENERATED (",t.generated,")"]}),f.jsx(kv,{b:n,known:r,onJump:i}),(n==null?void 0:n.values)&&f.jsx(Ev,{values:n.values}),t.comment&&f.jsx("span",{className:"comment",children:t.comment}),f.jsx(hr,{target:o})]})]}),f.jsx(Vn,{target:o,colSpan:3})]})}function Ev({values:e}){return f.jsx("span",{className:"chips",children:e.map(t=>f.jsx("span",{className:"chip",children:t},t))})}function Rb({table:e,change:t,badges:n,known:r,onJump:i}){const o=bv(e,t.name);if(t.status!=="modified"){const c=t.after??t.before;return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:t.status,children:[f.jsx("td",{className:"mark",children:wv[t.status]}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[f.jsx("code",{children:c.type}),c.notNull&&f.jsx("span",{className:"attr",children:"NOT NULL"}),c.default!==void 0&&f.jsxs("span",{className:"attr",children:["DEFAULT ",c.default]}),c.identity&&f.jsx("span",{className:"attr",children:"IDENTITY"}),c.generated&&f.jsxs("span",{className:"attr",children:["GENERATED (",c.generated,")"]}),t.status==="added"&&f.jsx(kv,{b:n,known:r,onJump:i}),t.status==="added"&&(n==null?void 0:n.values)&&f.jsx(Ev,{values:n.values}),c.comment&&f.jsx("span",{className:"comment",children:c.comment}),f.jsx(hr,{target:o})]})]}),f.jsx(Vn,{target:o,colSpan:3})]})}const s=new Map(pc(t.before).map(c=>[c.key,c.text])),l=pc(t.after),a=new Set(t.changed??[]),u=[...new Set([...l.map(c=>c.key),...s.keys()])];return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:"modified",children:[f.jsx("td",{className:"mark",children:"~"}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[u.map(c=>{var p;const d=(p=l.find(y=>y.key===c))==null?void 0:p.text,h=s.get(c);return a.has(c)?f.jsxs("span",{className:"attr change",children:[h!==void 0&&f.jsx("del",{children:h}),h!==void 0&&d!==void 0&&f.jsx("span",{className:"arrow",children:"→"}),d!==void 0&&f.jsx("ins",{children:d})]},c):d?f.jsx("span",{className:c==="type"?"attr type":"attr",children:d},c):null}),a.has("comment")&&f.jsxs("span",{className:"attr change",children:[f.jsx("span",{className:"muted",children:"コメント "}),t.before.comment!==void 0&&f.jsx("del",{children:t.before.comment}),f.jsx("span",{className:"arrow",children:"→"}),t.after.comment!==void 0?f.jsx("ins",{children:t.after.comment}):f.jsx("span",{className:"muted",children:"(なし)"})]}),f.jsx(hr,{target:o})]})]}),f.jsx(Vn,{target:o,colSpan:3})]})}const Sv={primary:"PK",unique:"UNIQUE",check:"CHECK",foreign:"FK",exclude:"EXCLUDE"};function Cv({table:e,known:t,onJump:n}){return!e||!t.has(e)?null:f.jsxs("button",{className:"jump link",onClick:()=>n(e),title:`${e} の変更へ移動`,children:["↗ ",e]})}function Go(e){return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:`row ${e.status??"plain"} ${e.target?"commentable":""}`,children:[f.jsx("span",{className:"mark",children:e.status?wv[e.status]:""}),f.jsx("span",{className:"tag kind",children:e.kind}),f.jsx("span",{className:"rbody",children:e.children}),f.jsx("span",{className:"rname",title:e.name,children:e.name}),e.target&&f.jsx(hr,{target:e.target})]}),e.target&&f.jsx(Vn,{target:e.target})]})}const Yl=(e,t,n)=>({kind:e,table:t,name:n});function uh({table:e,c:t,known:n,onJump:r}){var i;return f.jsxs(Go,{kind:Sv[t.kind],name:t.name,target:Yl("constraint",e,t.name),children:[f.jsx("code",{children:t.definition}),f.jsx(Cv,{table:(i=t.references)==null?void 0:i.table,known:n,onJump:r})]})}function Ob({table:e,change:t,known:n,onJump:r}){var s,l,a;const i=t.after??t.before,o=t.status==="modified"&&((s=t.before)!=null&&s.values)&&((l=t.after)!=null&&l.values)?Kl(t.before.values.values,t.after.values.values):null;return f.jsxs(Go,{status:t.status,kind:Sv[t.kind],name:t.name,target:Yl("constraint",e,t.name),children:[t.status!=="modified"?f.jsx("code",{children:i.definition}):o?f.jsxs(f.Fragment,{children:[f.jsxs("code",{children:[t.after.values.column,": "]}),f.jsx("span",{className:"chips",children:o.map(u=>f.jsxs("span",{className:`chip ${u.status}`,children:[u.status==="added"?"+":u.status==="removed"?"−":"",u.value]},u.value))})]}):f.jsxs("span",{className:"change-block",children:[f.jsx("del",{children:t.before.definition}),f.jsx("ins",{children:t.after.definition})]}),t.status!=="removed"&&f.jsx(Cv,{table:(a=i.references)==null?void 0:a.table,known:n,onJump:r})]})}function ch({table:e,i:t}){return f.jsx(Go,{kind:t.unique?"UNIQUE":"INDEX",name:t.name,target:Yl("index",e,t.name),children:f.jsx("code",{children:fo(t)})})}function Mb({table:e,change:t}){const n=t.after??t.before;return f.jsx(Go,{status:t.status,kind:n.unique?"UNIQUE":"INDEX",name:t.name,target:Yl("index",e,t.name),children:t.status==="modified"?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.unique?"UNIQUE ":"",fo(t.before)]}),f.jsxs("ins",{children:[t.after.unique?"UNIQUE ":"",fo(t.after)]})]}):f.jsx("code",{children:fo(n)})})}function Pb({before:e,after:t,status:n}){return n!=="modified"?f.jsx("div",{className:"table-comment",children:t??e}):f.jsx(Go,{status:"modified",kind:"COMMENT",name:"",children:f.jsxs("span",{className:"change-block",children:[e!==void 0?f.jsx("del",{children:e}):f.jsx("span",{className:"muted",children:"(なし)"}),t!==void 0?f.jsx("ins",{children:t}):f.jsx("span",{className:"muted",children:"(なし)"})]})})}function Fb(e){return f.jsxs("aside",{className:"panel",children:[f.jsxs("div",{className:"panel-head",children:[f.jsx("span",{className:"panel-title",children:e.selection.name}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:e.onClose,"aria-label":"閉じる",title:"閉じる(Esc)",children:"×"})]}),f.jsxs("div",{className:"panel-body",children:[e.selection.kind==="type"&&e.type&&f.jsx(Bb,{kind:e.type.kind,change:e.type.change}),e.selection.kind==="table"&&(e.change?f.jsx(Ib,{table:e.change,reviewed:e.reviewed,onReviewed:e.onReviewed,known:e.known,onJump:e.onJump,highlighted:!1,alwaysOpen:!0},e.change.name):e.erTable?f.jsx(Db,{t:e.erTable}):null),e.values.length>0&&f.jsxs("div",{className:"panel-section",children:[f.jsx("div",{className:"section-title",children:"値の変化"}),e.values.map((t,n)=>f.jsx(zb,{v:t},n))]})]})]})}function Db({t:e}){const t=gl(e.name);return f.jsxs("div",{className:"unchanged-table",children:[f.jsxs("p",{className:"muted unchanged-note",children:["このテーブルは変更されていません。",f.jsx(hr,{target:t,label:"テーブル全体"})]}),f.jsx(Vn,{target:t}),f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(n=>f.jsx(hc,{table:e.name,c:{name:n.name,type:n.type,notNull:n.notNull},badges:{primary:n.primary,unique:!1,references:e.foreignKeys.filter(r=>r.columns.length===1&&r.columns[0]===n.name).map(r=>({table:r.table,columns:r.refColumns}))},known:new Set,onJump:()=>{}},n.name))})})]})}function zb({v:e}){const t=pv(e),n=Kl(e.before,e.after),r=e.source==="check"?{kind:"value",table:e.table,name:e.column??""}:{kind:"type",name:e.type??""};return f.jsxs("div",{className:"value-row commentable",children:[f.jsx(hr,{target:r,label:e.source==="check"?`${e.column} の値`:void 0}),f.jsxs("div",{className:"value-head",children:[f.jsx("span",{className:"vname",children:t.label}),f.jsx("span",{className:"tag kind",children:e.source==="check"?"CHECK":e.source==="enum"?"ENUM 型":"DOMAIN"}),e.constraint&&f.jsx("span",{className:"muted",children:e.constraint}),e.status==="added"&&f.jsx("span",{className:"note",children:"値の制限が付きました"}),e.status==="removed"&&f.jsx("span",{className:"note",children:"値の制限がなくなりました"})]}),f.jsx("div",{className:"chips",children:n.map(i=>f.jsxs("span",{className:`chip ${e.status==="added"?"same":i.status}`,children:[e.status==="modified"&&i.status==="added"?"+":i.status==="removed"?"−":"",i.value]},i.value))}),e.usedBy&&e.usedBy.length>0&&f.jsxs("div",{className:"muted used",children:["使用しているカラム: ",e.usedBy.join(", ")]}),f.jsx(Vn,{target:r})]})}function Bb({kind:e,change:t}){const n=t.before&&"values"in t.before?t.before.values:void 0,r=t.after&&"values"in t.after?t.after.values:void 0,i=t.after??t.before,o={kind:"type",name:t.name};return f.jsxs("div",{className:"value-row commentable",children:[f.jsx(hr,{target:o}),f.jsxs("div",{className:`value-head tinted ${t.status}`,children:[f.jsx("span",{className:"vname",children:t.name}),f.jsx("span",{className:"tag kind",children:e})]}),e==="ENUM 型"?f.jsx("div",{className:"chips",children:Kl(t.status==="added"?void 0:n,t.status==="removed"?n:r).map(s=>f.jsxs("span",{className:`chip ${t.status==="modified"?s.status:"same"}`,children:[t.status==="modified"&&s.status==="added"?"+":s.status==="removed"&&t.status==="modified"?"−":"",s.value]},s.value))}):i&&f.jsx("div",{className:"domain",children:t.status==="modified"&&t.before&&t.after&&"type"in t.before&&"type"in t.after?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.type,t.before.notNull?" NOT NULL":"",t.before.checks.map(s=>` ${s.definition}`).join("")]}),f.jsxs("ins",{children:[t.after.type,t.after.notNull?" NOT NULL":"",t.after.checks.map(s=>` ${s.definition}`).join("")]})]}):f.jsxs("code",{children:[i.type,i.notNull?" NOT NULL":"",i.checks.map(s=>` ${s.definition}`).join("")]})}),f.jsx(Vn,{target:o})]})}var We=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Sn=We((e,t)=>{var n=Object.defineProperty,r=(A,R,q)=>R in A?n(A,R,{enumerable:!0,configurable:!0,writable:!0,value:q}):A[R]=q,i=(A,R)=>()=>(R||A((R={exports:{}}).exports,R),R.exports),o=(A,R,q)=>r(A,typeof R!="symbol"?R+"":R,q),s=i((A,R)=>{var q="\0",B="\0",V="",z=class{constructor(P){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),P&&(this._isDirected=Object.hasOwn(P,"directed")?P.directed:!0,this._isMultigraph=Object.hasOwn(P,"multigraph")?P.multigraph:!1,this._isCompound=Object.hasOwn(P,"compound")?P.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[B]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(P){return this._label=P,this}graph(){return this._label}setDefaultNodeLabel(P){return this._defaultNodeLabelFn=P,typeof P!="function"&&(this._defaultNodeLabelFn=()=>P),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var P=this;return this.nodes().filter(L=>Object.keys(P._in[L]).length===0)}sinks(){var P=this;return this.nodes().filter(L=>Object.keys(P._out[L]).length===0)}setNodes(P,L){var F=arguments,K=this;return P.forEach(function(Z){F.length>1?K.setNode(Z,L):K.setNode(Z)}),this}setNode(P,L){return Object.hasOwn(this._nodes,P)?(arguments.length>1&&(this._nodes[P]=L),this):(this._nodes[P]=arguments.length>1?L:this._defaultNodeLabelFn(P),this._isCompound&&(this._parent[P]=B,this._children[P]={},this._children[B][P]=!0),this._in[P]={},this._preds[P]={},this._out[P]={},this._sucs[P]={},++this._nodeCount,this)}node(P){return this._nodes[P]}hasNode(P){return Object.hasOwn(this._nodes,P)}removeNode(P){var L=this;if(Object.hasOwn(this._nodes,P)){var F=K=>L.removeEdge(L._edgeObjs[K]);delete this._nodes[P],this._isCompound&&(this._removeFromParentsChildList(P),delete this._parent[P],this.children(P).forEach(function(K){L.setParent(K)}),delete this._children[P]),Object.keys(this._in[P]).forEach(F),delete this._in[P],delete this._preds[P],Object.keys(this._out[P]).forEach(F),delete this._out[P],delete this._sucs[P],--this._nodeCount}return this}setParent(P,L){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(L===void 0)L=B;else{L+="";for(var F=L;F!==void 0;F=this.parent(F))if(F===P)throw new Error("Setting "+L+" as parent of "+P+" would create a cycle");this.setNode(L)}return this.setNode(P),this._removeFromParentsChildList(P),this._parent[P]=L,this._children[L][P]=!0,this}_removeFromParentsChildList(P){delete this._children[this._parent[P]][P]}parent(P){if(this._isCompound){var L=this._parent[P];if(L!==B)return L}}children(P=B){if(this._isCompound){var L=this._children[P];if(L)return Object.keys(L)}else{if(P===B)return this.nodes();if(this.hasNode(P))return[]}}predecessors(P){var L=this._preds[P];if(L)return Object.keys(L)}successors(P){var L=this._sucs[P];if(L)return Object.keys(L)}neighbors(P){var L=this.predecessors(P);if(L){let K=new Set(L);for(var F of this.successors(P))K.add(F);return Array.from(K.values())}}isLeaf(P){var L;return this.isDirected()?L=this.successors(P):L=this.neighbors(P),L.length===0}filterNodes(P){var L=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});L.setGraph(this.graph());var F=this;Object.entries(this._nodes).forEach(function([te,ie]){P(te)&&L.setNode(te,ie)}),Object.values(this._edgeObjs).forEach(function(te){L.hasNode(te.v)&&L.hasNode(te.w)&&L.setEdge(te,F.edge(te))});var K={};function Z(te){var ie=F.parent(te);return ie===void 0||L.hasNode(ie)?(K[te]=ie,ie):ie in K?K[ie]:Z(ie)}return this._isCompound&&L.nodes().forEach(te=>L.setParent(te,Z(te))),L}setDefaultEdgeLabel(P){return this._defaultEdgeLabelFn=P,typeof P!="function"&&(this._defaultEdgeLabelFn=()=>P),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(P,L){var F=this,K=arguments;return P.reduce(function(Z,te){return K.length>1?F.setEdge(Z,te,L):F.setEdge(Z,te),te}),this}setEdge(){var P,L,F,K,Z=!1,te=arguments[0];typeof te=="object"&&te!==null&&"v"in te?(P=te.v,L=te.w,F=te.name,arguments.length===2&&(K=arguments[1],Z=!0)):(P=te,L=arguments[1],F=arguments[3],arguments.length>2&&(K=arguments[2],Z=!0)),P=""+P,L=""+L,F!==void 0&&(F=""+F);var ie=Q(this._isDirected,P,L,F);if(Object.hasOwn(this._edgeLabels,ie))return Z&&(this._edgeLabels[ie]=K),this;if(F!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(P),this.setNode(L),this._edgeLabels[ie]=Z?K:this._defaultEdgeLabelFn(P,L,F);var de=H(this._isDirected,P,L,F);return P=de.v,L=de.w,Object.freeze(de),this._edgeObjs[ie]=de,U(this._preds[L],P),U(this._sucs[P],L),this._in[L][ie]=de,this._out[P][ie]=de,this._edgeCount++,this}edge(P,L,F){var K=arguments.length===1?j(this._isDirected,arguments[0]):Q(this._isDirected,P,L,F);return this._edgeLabels[K]}edgeAsObj(){let P=this.edge(...arguments);return typeof P!="object"?{label:P}:P}hasEdge(P,L,F){var K=arguments.length===1?j(this._isDirected,arguments[0]):Q(this._isDirected,P,L,F);return Object.hasOwn(this._edgeLabels,K)}removeEdge(P,L,F){var K=arguments.length===1?j(this._isDirected,arguments[0]):Q(this._isDirected,P,L,F),Z=this._edgeObjs[K];return Z&&(P=Z.v,L=Z.w,delete this._edgeLabels[K],delete this._edgeObjs[K],b(this._preds[L],P),b(this._sucs[P],L),delete this._in[L][K],delete this._out[P][K],this._edgeCount--),this}inEdges(P,L){return this.isDirected()?this.filterEdges(this._in[P],P,L):this.nodeEdges(P,L)}outEdges(P,L){return this.isDirected()?this.filterEdges(this._out[P],P,L):this.nodeEdges(P,L)}nodeEdges(P,L){if(P in this._nodes)return this.filterEdges({...this._in[P],...this._out[P]},P,L)}filterEdges(P,L,F){if(P){var K=Object.values(P);return F?K.filter(function(Z){return Z.v===L&&Z.w===F||Z.v===F&&Z.w===L}):K}}};function U(P,L){P[L]?P[L]++:P[L]=1}function b(P,L){--P[L]||delete P[L]}function Q(P,L,F,K){var Z=""+L,te=""+F;if(!P&&Z>te){var ie=Z;Z=te,te=ie}return Z+V+te+V+(K===void 0?q:K)}function H(P,L,F,K){var Z=""+L,te=""+F;if(!P&&Z>te){var ie=Z;Z=te,te=ie}var de={v:Z,w:te};return K&&(de.name=K),de}function j(P,L){return Q(P,L.v,L.w,L.name)}R.exports=z}),l=i((A,R)=>{R.exports="3.0.2"}),a=i((A,R)=>{R.exports={Graph:s(),version:l()}}),u=i((A,R)=>{var q=s();R.exports={write:B,read:U};function B(b){var Q={options:{directed:b.isDirected(),multigraph:b.isMultigraph(),compound:b.isCompound()},nodes:V(b),edges:z(b)};return b.graph()!==void 0&&(Q.value=structuredClone(b.graph())),Q}function V(b){return b.nodes().map(function(Q){var H=b.node(Q),j=b.parent(Q),P={v:Q};return H!==void 0&&(P.value=H),j!==void 0&&(P.parent=j),P})}function z(b){return b.edges().map(function(Q){var H=b.edge(Q),j={v:Q.v,w:Q.w};return Q.name!==void 0&&(j.name=Q.name),H!==void 0&&(j.value=H),j})}function U(b){var Q=new q(b.options).setGraph(b.value);return b.nodes.forEach(function(H){Q.setNode(H.v,H.value),H.parent&&Q.setParent(H.v,H.parent)}),b.edges.forEach(function(H){Q.setEdge({v:H.v,w:H.w,name:H.name},H.value)}),Q}}),c=i((A,R)=>{R.exports=B;var q=()=>1;function B(z,U,b,Q){return V(z,String(U),b||q,Q||function(H){return z.outEdges(H)})}function V(z,U,b,Q){var H={},j=!0,P=0,L=z.nodes(),F=function(ie){var de=b(ie);H[ie.v].distance+de<H[ie.w].distance&&(H[ie.w]={distance:H[ie.v].distance+de,predecessor:ie.v},j=!0)},K=function(){L.forEach(function(ie){Q(ie).forEach(function(de){var _e=de.v===ie?de.v:de.w,fe=_e===de.v?de.w:de.v;F({v:_e,w:fe})})})};L.forEach(function(ie){var de=ie===U?0:Number.POSITIVE_INFINITY;H[ie]={distance:de}});for(var Z=L.length,te=1;te<Z&&(j=!1,P++,K(),!!j);te++);if(P===Z-1&&(j=!1,K(),j))throw new Error("The graph contains a negative weight cycle");return H}}),d=i((A,R)=>{R.exports=q;function q(B){var V={},z=[],U;function b(Q){Object.hasOwn(V,Q)||(V[Q]=!0,U.push(Q),B.successors(Q).forEach(b),B.predecessors(Q).forEach(b))}return B.nodes().forEach(function(Q){U=[],b(Q),U.length&&z.push(U)}),z}}),h=i((A,R)=>{var q=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(B){return B.key})}has(B){return Object.hasOwn(this._keyIndices,B)}priority(B){var V=this._keyIndices[B];if(V!==void 0)return this._arr[V].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(B,V){var z=this._keyIndices;if(B=String(B),!Object.hasOwn(z,B)){var U=this._arr,b=U.length;return z[B]=b,U.push({key:B,priority:V}),this._decrease(b),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var B=this._arr.pop();return delete this._keyIndices[B.key],this._heapify(0),B.key}decrease(B,V){var z=this._keyIndices[B];if(V>this._arr[z].priority)throw new Error("New priority is greater than current priority. Key: "+B+" Old: "+this._arr[z].priority+" New: "+V);this._arr[z].priority=V,this._decrease(z)}_heapify(B){var V=this._arr,z=2*B,U=z+1,b=B;z<V.length&&(b=V[z].priority<V[b].priority?z:b,U<V.length&&(b=V[U].priority<V[b].priority?U:b),b!==B&&(this._swap(B,b),this._heapify(b)))}_decrease(B){for(var V=this._arr,z=V[B].priority,U;B!==0&&(U=B>>1,!(V[U].priority<z));)this._swap(B,U),B=U}_swap(B,V){var z=this._arr,U=this._keyIndices,b=z[B],Q=z[V];z[B]=Q,z[V]=b,U[Q.key]=B,U[b.key]=V}};R.exports=q}),p=i((A,R)=>{var q=h();R.exports=V;var B=()=>1;function V(U,b,Q,H){var j=function(P){return U.outEdges(P)};return z(U,String(b),Q||B,H||j)}function z(U,b,Q,H){var j={},P=new q,L,F,K=function(Z){var te=Z.v!==L?Z.v:Z.w,ie=j[te],de=Q(Z),_e=F.distance+de;if(de<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+Z+" Weight: "+de);_e<ie.distance&&(ie.distance=_e,ie.predecessor=L,P.decrease(te,_e))};for(U.nodes().forEach(function(Z){var te=Z===b?0:Number.POSITIVE_INFINITY;j[Z]={distance:te},P.add(Z,te)});P.size()>0&&(L=P.removeMin(),F=j[L],F.distance!==Number.POSITIVE_INFINITY);)H(L).forEach(K);return j}}),y=i((A,R)=>{var q=p();R.exports=B;function B(V,z,U){return V.nodes().reduce(function(b,Q){return b[Q]=q(V,Q,z,U),b},{})}}),x=i((A,R)=>{R.exports=q;function q(V,z,U){if(V[z].predecessor!==void 0)throw new Error("Invalid source vertex");if(V[U].predecessor===void 0&&U!==z)throw new Error("Invalid destination vertex");return{weight:V[U].distance,path:B(V,z,U)}}function B(V,z,U){for(var b=[],Q=U;Q!==z;)b.push(Q),Q=V[Q].predecessor;return b.push(z),b.reverse()}}),S=i((A,R)=>{R.exports=q;function q(B){var V=0,z=[],U={},b=[];function Q(H){var j=U[H]={onStack:!0,lowlink:V,index:V++};if(z.push(H),B.successors(H).forEach(function(F){Object.hasOwn(U,F)?U[F].onStack&&(j.lowlink=Math.min(j.lowlink,U[F].index)):(Q(F),j.lowlink=Math.min(j.lowlink,U[F].lowlink))}),j.lowlink===j.index){var P=[],L;do L=z.pop(),U[L].onStack=!1,P.push(L);while(H!==L);b.push(P)}}return B.nodes().forEach(function(H){Object.hasOwn(U,H)||Q(H)}),b}}),v=i((A,R)=>{var q=S();R.exports=B;function B(V){return q(V).filter(function(z){return z.length>1||z.length===1&&V.hasEdge(z[0],z[0])})}}),m=i((A,R)=>{R.exports=B;var q=()=>1;function B(z,U,b){return V(z,U||q,b||function(Q){return z.outEdges(Q)})}function V(z,U,b){var Q={},H=z.nodes();return H.forEach(function(j){Q[j]={},Q[j][j]={distance:0},H.forEach(function(P){j!==P&&(Q[j][P]={distance:Number.POSITIVE_INFINITY})}),b(j).forEach(function(P){var L=P.v===j?P.w:P.v,F=U(P);Q[j][L]={distance:F,predecessor:j}})}),H.forEach(function(j){var P=Q[j];H.forEach(function(L){var F=Q[L];H.forEach(function(K){var Z=F[j],te=P[K],ie=F[K],de=Z.distance+te.distance;de<ie.distance&&(ie.distance=de,ie.predecessor=te.predecessor)})})}),Q}}),g=i((A,R)=>{function q(V){var z={},U={},b=[];function Q(H){if(Object.hasOwn(U,H))throw new B;Object.hasOwn(z,H)||(U[H]=!0,z[H]=!0,V.predecessors(H).forEach(Q),delete U[H],b.push(H))}if(V.sinks().forEach(Q),Object.keys(z).length!==V.nodeCount())throw new B;return b}var B=class extends Error{constructor(){super(...arguments)}};R.exports=q,q.CycleException=B}),w=i((A,R)=>{var q=g();R.exports=B;function B(V){try{q(V)}catch(z){if(z instanceof q.CycleException)return!1;throw z}return!0}}),$=i((A,R)=>{R.exports=q;function q(V,z,U,b,Q){Array.isArray(z)||(z=[z]);var H=(V.isDirected()?V.successors:V.neighbors).bind(V),j={};return z.forEach(function(P){if(!V.hasNode(P))throw new Error("Graph does not have node: "+P);Q=B(V,P,U==="post",j,H,b,Q)}),Q}function B(V,z,U,b,Q,H,j){return Object.hasOwn(b,z)||(b[z]=!0,U||(j=H(j,z)),Q(z).forEach(function(P){j=B(V,P,U,b,Q,H,j)}),U&&(j=H(j,z))),j}}),k=i((A,R)=>{var q=$();R.exports=B;function B(V,z,U){return q(V,z,U,function(b,Q){return b.push(Q),b},[])}}),_=i((A,R)=>{var q=k();R.exports=B;function B(V,z){return q(V,z,"post")}}),N=i((A,R)=>{var q=k();R.exports=B;function B(V,z){return q(V,z,"pre")}}),D=i((A,R)=>{var q=s(),B=h();R.exports=V;function V(z,U){var b=new q,Q={},H=new B,j;function P(F){var K=F.v===j?F.w:F.v,Z=H.priority(K);if(Z!==void 0){var te=U(F);te<Z&&(Q[K]=j,H.decrease(K,te))}}if(z.nodeCount()===0)return b;z.nodes().forEach(function(F){H.add(F,Number.POSITIVE_INFINITY),b.setNode(F)}),H.decrease(z.nodes()[0],0);for(var L=!1;H.size()>0;){if(j=H.removeMin(),Object.hasOwn(Q,j))b.setEdge(j,Q[j]);else{if(L)throw new Error("Input graph is not connected: "+z);L=!0}z.nodeEdges(j).forEach(P)}return b}}),E=i((A,R)=>{var q=p(),B=c();R.exports=V;function V(U,b,Q,H){return z(U,b,Q,H||function(j){return U.outEdges(j)})}function z(U,b,Q,H){if(Q===void 0)return q(U,b,Q,H);for(var j=!1,P=U.nodes(),L=0;L<P.length;L++){for(var F=H(P[L]),K=0;K<F.length;K++){var Z=F[K],te=Z.v===P[L]?Z.v:Z.w,ie=te===Z.v?Z.w:Z.v;Q({v:te,w:ie})<0&&(j=!0)}if(j)return B(U,b,Q,H)}return q(U,b,Q,H)}}),O=i((A,R)=>{R.exports={bellmanFord:c(),components:d(),dijkstra:p(),dijkstraAll:y(),extractPath:x(),findCycles:v(),floydWarshall:m(),isAcyclic:w(),postorder:_(),preorder:N(),prim:D(),shortestPaths:E(),reduce:$(),tarjan:S(),topsort:g()}}),C=a();t.exports={Graph:C.Graph,json:u(),alg:O(),version:C.version}}),Ub=We((e,t)=>{var n=class{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,s=o._prev;if(s!==o)return r(s),s}enqueue(o){let s=this._sentinel;o._prev&&o._next&&r(o),o._next=s._next,s._next._prev=o,s._next=o,o._prev=s}toString(){let o=[],s=this._sentinel,l=s._prev;for(;l!==s;)o.push(JSON.stringify(l,i)),l=l._prev;return"["+o.join(", ")+"]"}};function r(o){o._prev._next=o._next,o._next._prev=o._prev,delete o._next,delete o._prev}function i(o,s){if(o!=="_next"&&o!=="_prev")return s}t.exports=n}),Hb=We((e,t)=>{var n=Sn().Graph,r=Ub();t.exports=o;var i=()=>1;function o(d,h){if(d.nodeCount()<=1)return[];let p=a(d,h||i);return s(p.graph,p.buckets,p.zeroIdx).flatMap(y=>d.outEdges(y.v,y.w))}function s(d,h,p){let y=[],x=h[h.length-1],S=h[0],v;for(;d.nodeCount();){for(;v=S.dequeue();)l(d,h,p,v);for(;v=x.dequeue();)l(d,h,p,v);if(d.nodeCount()){for(let m=h.length-2;m>0;--m)if(v=h[m].dequeue(),v){y=y.concat(l(d,h,p,v,!0));break}}}return y}function l(d,h,p,y,x){let S=x?[]:void 0;return d.inEdges(y.v).forEach(v=>{let m=d.edge(v),g=d.node(v.v);x&&S.push({v:v.v,w:v.w}),g.out-=m,u(h,p,g)}),d.outEdges(y.v).forEach(v=>{let m=d.edge(v),g=v.w,w=d.node(g);w.in-=m,u(h,p,w)}),d.removeNode(y.v),S}function a(d,h){let p=new n,y=0,x=0;d.nodes().forEach(m=>{p.setNode(m,{v:m,in:0,out:0})}),d.edges().forEach(m=>{let g=p.edge(m.v,m.w)||0,w=h(m),$=g+w;p.setEdge(m.v,m.w,$),x=Math.max(x,p.node(m.v).out+=w),y=Math.max(y,p.node(m.w).in+=w)});let S=c(x+y+3).map(()=>new r),v=y+1;return p.nodes().forEach(m=>{u(S,v,p.node(m))}),{graph:p,buckets:S,zeroIdx:v}}function u(d,h,p){p.out?p.in?d[p.out-p.in+h].enqueue(p):d[d.length-1].enqueue(p):d[0].enqueue(p)}function c(d){let h=[];for(let p=0;p<d;p++)h.push(p);return h}}),at=We((e,t)=>{var n=Sn().Graph;t.exports={addBorderNode:h,addDummyNode:r,applyWithChunking:x,asNonCompoundGraph:o,buildLayerMatrix:u,intersectRect:a,mapValues:N,maxRank:S,normalizeRanks:c,notime:g,partition:v,pick:_,predecessorWeights:l,range:k,removeEmptyRanks:d,simplify:i,successorWeights:s,time:m,uniqueId:$,zipObject:D};function r(E,O,C,A){for(var R=A;E.hasNode(R);)R=$(A);return C.dummy=O,E.setNode(R,C),R}function i(E){let O=new n().setGraph(E.graph());return E.nodes().forEach(C=>O.setNode(C,E.node(C))),E.edges().forEach(C=>{let A=O.edge(C.v,C.w)||{weight:0,minlen:1},R=E.edge(C);O.setEdge(C.v,C.w,{weight:A.weight+R.weight,minlen:Math.max(A.minlen,R.minlen)})}),O}function o(E){let O=new n({multigraph:E.isMultigraph()}).setGraph(E.graph());return E.nodes().forEach(C=>{E.children(C).length||O.setNode(C,E.node(C))}),E.edges().forEach(C=>{O.setEdge(C,E.edge(C))}),O}function s(E){let O=E.nodes().map(C=>{let A={};return E.outEdges(C).forEach(R=>{A[R.w]=(A[R.w]||0)+E.edge(R).weight}),A});return D(E.nodes(),O)}function l(E){let O=E.nodes().map(C=>{let A={};return E.inEdges(C).forEach(R=>{A[R.v]=(A[R.v]||0)+E.edge(R).weight}),A});return D(E.nodes(),O)}function a(E,O){let C=E.x,A=E.y,R=O.x-C,q=O.y-A,B=E.width/2,V=E.height/2;if(!R&&!q)throw new Error("Not possible to find intersection inside of the rectangle");let z,U;return Math.abs(q)*B>Math.abs(R)*V?(q<0&&(V=-V),z=V*R/q,U=V):(R<0&&(B=-B),z=B,U=B*q/R),{x:C+z,y:A+U}}function u(E){let O=k(S(E)+1).map(()=>[]);return E.nodes().forEach(C=>{let A=E.node(C),R=A.rank;R!==void 0&&(O[R][A.order]=C)}),O}function c(E){let O=E.nodes().map(A=>{let R=E.node(A).rank;return R===void 0?Number.MAX_VALUE:R}),C=x(Math.min,O);E.nodes().forEach(A=>{let R=E.node(A);Object.hasOwn(R,"rank")&&(R.rank-=C)})}function d(E){let O=E.nodes().map(B=>E.node(B).rank).filter(B=>B!==void 0),C=x(Math.min,O),A=[];E.nodes().forEach(B=>{let V=E.node(B).rank-C;A[V]||(A[V]=[]),A[V].push(B)});let R=0,q=E.graph().nodeRankFactor;Array.from(A).forEach((B,V)=>{B===void 0&&V%q!==0?--R:B!==void 0&&R&&B.forEach(z=>E.node(z).rank+=R)})}function h(E,O,C,A){let R={width:0,height:0};return arguments.length>=4&&(R.rank=C,R.order=A),r(E,"border",R,O)}function p(E,O=y){let C=[];for(let A=0;A<E.length;A+=O){let R=E.slice(A,A+O);C.push(R)}return C}var y=65535;function x(E,O){if(O.length>y){let C=p(O);return E.apply(null,C.map(A=>E.apply(null,A)))}else return E.apply(null,O)}function S(E){let O=E.nodes().map(C=>{let A=E.node(C).rank;return A===void 0?Number.MIN_VALUE:A});return x(Math.max,O)}function v(E,O){let C={lhs:[],rhs:[]};return E.forEach(A=>{O(A)?C.lhs.push(A):C.rhs.push(A)}),C}function m(E,O){let C=Date.now();try{return O()}finally{console.log(E+" time: "+(Date.now()-C)+"ms")}}function g(E,O){return O()}var w=0;function $(E){var O=++w;return E+(""+O)}function k(E,O,C=1){O==null&&(O=E,E=0);let A=q=>q<O;C<0&&(A=q=>O<q);let R=[];for(let q=E;A(q);q+=C)R.push(q);return R}function _(E,O){let C={};for(let A of O)E[A]!==void 0&&(C[A]=E[A]);return C}function N(E,O){let C=O;return typeof O=="string"&&(C=A=>A[O]),Object.entries(E).reduce((A,[R,q])=>(A[R]=C(q,R),A),{})}function D(E,O){return E.reduce((C,A,R)=>(C[A]=O[R],C),{})}}),Wb=We((e,t)=>{var n=Hb(),r=at().uniqueId;t.exports={run:i,undo:s};function i(l){(l.graph().acyclicer==="greedy"?n(l,a(l)):o(l)).forEach(u=>{let c=l.edge(u);l.removeEdge(u),c.forwardName=u.name,c.reversed=!0,l.setEdge(u.w,u.v,c,r("rev"))});function a(u){return c=>u.edge(c).weight}}function o(l){let a=[],u={},c={};function d(h){Object.hasOwn(c,h)||(c[h]=!0,u[h]=!0,l.outEdges(h).forEach(p=>{Object.hasOwn(u,p.w)?a.push(p):d(p.w)}),delete u[h])}return l.nodes().forEach(d),a}function s(l){l.edges().forEach(a=>{let u=l.edge(a);if(u.reversed){l.removeEdge(a);let c=u.forwardName;delete u.reversed,delete u.forwardName,l.setEdge(a.w,a.v,u,c)}})}}),Vb=We((e,t)=>{var n=at();t.exports={run:r,undo:o};function r(s){s.graph().dummyChains=[],s.edges().forEach(l=>i(s,l))}function i(s,l){let a=l.v,u=s.node(a).rank,c=l.w,d=s.node(c).rank,h=l.name,p=s.edge(l),y=p.labelRank;if(d===u+1)return;s.removeEdge(l);let x,S,v;for(v=0,++u;u<d;++v,++u)p.points=[],S={width:0,height:0,edgeLabel:p,edgeObj:l,rank:u},x=n.addDummyNode(s,"edge",S,"_d"),u===y&&(S.width=p.width,S.height=p.height,S.dummy="edge-label",S.labelpos=p.labelpos),s.setEdge(a,x,{weight:p.weight},h),v===0&&s.graph().dummyChains.push(x),a=x;s.setEdge(a,c,{weight:p.weight},h)}function o(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),u=a.edgeLabel,c;for(s.setEdge(a.edgeObj,u);a.dummy;)c=s.successors(l)[0],s.removeNode(l),u.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(u.x=a.x,u.y=a.y,u.width=a.width,u.height=a.height),l=c,a=s.node(l)})}}),yl=We((e,t)=>{var{applyWithChunking:n}=at();t.exports={longestPath:r,slack:i};function r(o){var s={};function l(a){var u=o.node(a);if(Object.hasOwn(s,a))return u.rank;s[a]=!0;let c=o.outEdges(a).map(h=>h==null?Number.POSITIVE_INFINITY:l(h.w)-o.edge(h).minlen);var d=n(Math.min,c);return d===Number.POSITIVE_INFINITY&&(d=0),u.rank=d}o.sources().forEach(l)}function i(o,s){return o.node(s.w).rank-o.node(s.v).rank-o.edge(s).minlen}}),Nv=We((e,t)=>{var n=Sn().Graph,r=yl().slack;t.exports=i;function i(a){var u=new n({directed:!1}),c=a.nodes()[0],d=a.nodeCount();u.setNode(c,{});for(var h,p;o(u,a)<d;)h=s(u,a),p=u.hasNode(h.v)?r(a,h):-r(a,h),l(u,a,p);return u}function o(a,u){function c(d){u.nodeEdges(d).forEach(h=>{var p=h.v,y=d===p?h.w:p;!a.hasNode(y)&&!r(u,h)&&(a.setNode(y,{}),a.setEdge(d,y,{}),c(y))})}return a.nodes().forEach(c),a.nodeCount()}function s(a,u){return u.edges().reduce((c,d)=>{let h=Number.POSITIVE_INFINITY;return a.hasNode(d.v)!==a.hasNode(d.w)&&(h=r(u,d)),h<c[0]?[h,d]:c},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,c){a.nodes().forEach(d=>u.node(d).rank+=c)}}),qb=We((e,t)=>{var n=Nv(),r=yl().slack,i=yl().longestPath,o=Sn().alg.preorder,s=Sn().alg.postorder,l=at().simplify;t.exports=a,a.initLowLimValues=h,a.initCutValues=u,a.calcCutValue=d,a.leaveEdge=y,a.enterEdge=x,a.exchangeEdges=S;function a(w){w=l(w),i(w);var $=n(w);h($),u($,w);for(var k,_;k=y($);)_=x($,w,k),S($,w,k,_)}function u(w,$){var k=s(w,w.nodes());k=k.slice(0,k.length-1),k.forEach(_=>c(w,$,_))}function c(w,$,k){var _=w.node(k),N=_.parent;w.edge(k,N).cutvalue=d(w,$,k)}function d(w,$,k){var _=w.node(k),N=_.parent,D=!0,E=$.edge(k,N),O=0;return E||(D=!1,E=$.edge(N,k)),O=E.weight,$.nodeEdges(k).forEach(C=>{var A=C.v===k,R=A?C.w:C.v;if(R!==N){var q=A===D,B=$.edge(C).weight;if(O+=q?B:-B,m(w,k,R)){var V=w.edge(k,R).cutvalue;O+=q?-V:V}}}),O}function h(w,$){arguments.length<2&&($=w.nodes()[0]),p(w,{},1,$)}function p(w,$,k,_,N){var D=k,E=w.node(_);return $[_]=!0,w.neighbors(_).forEach(O=>{Object.hasOwn($,O)||(k=p(w,$,k,O,_))}),E.low=D,E.lim=k++,N?E.parent=N:delete E.parent,k}function y(w){return w.edges().find($=>w.edge($).cutvalue<0)}function x(w,$,k){var _=k.v,N=k.w;$.hasEdge(_,N)||(_=k.w,N=k.v);var D=w.node(_),E=w.node(N),O=D,C=!1;D.lim>E.lim&&(O=E,C=!0);var A=$.edges().filter(R=>C===g(w,w.node(R.v),O)&&C!==g(w,w.node(R.w),O));return A.reduce((R,q)=>r($,q)<r($,R)?q:R)}function S(w,$,k,_){var N=k.v,D=k.w;w.removeEdge(N,D),w.setEdge(_.v,_.w,{}),h(w),u(w,$),v(w,$)}function v(w,$){var k=w.nodes().find(N=>!$.node(N).parent),_=o(w,k);_=_.slice(1),_.forEach(N=>{var D=w.node(N).parent,E=$.edge(N,D),O=!1;E||(E=$.edge(D,N),O=!0),$.node(N).rank=$.node(D).rank+(O?E.minlen:-E.minlen)})}function m(w,$,k){return w.hasEdge($,k)}function g(w,$,k){return k.low<=$.lim&&$.lim<=k.lim}}),Kb=We((e,t)=>{var n=yl(),r=n.longestPath,i=Nv(),o=qb();t.exports=s;function s(c){var d=c.graph().ranker;if(d instanceof Function)return d(c);switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":a(c);break;case"longest-path":l(c);break;case"none":break;default:u(c)}}var l=r;function a(c){r(c),i(c)}function u(c){o(c)}}),Gb=We((e,t)=>{t.exports=n;function n(o){let s=i(o);o.graph().dummyChains.forEach(l=>{let a=o.node(l),u=a.edgeObj,c=r(o,s,u.v,u.w),d=c.path,h=c.lca,p=0,y=d[p],x=!0;for(;l!==u.w;){if(a=o.node(l),x){for(;(y=d[p])!==h&&o.node(y).maxRank<a.rank;)p++;y===h&&(x=!1)}if(!x){for(;p<d.length-1&&o.node(y=d[p+1]).minRank<=a.rank;)p++;y=d[p]}o.setParent(l,y),l=o.successors(l)[0]}})}function r(o,s,l,a){let u=[],c=[],d=Math.min(s[l].low,s[a].low),h=Math.max(s[l].lim,s[a].lim),p,y;p=l;do p=o.parent(p),u.push(p);while(p&&(s[p].low>d||h>s[p].lim));for(y=p,p=a;(p=o.parent(p))!==y;)c.push(p);return{path:u.concat(c.reverse()),lca:y}}function i(o){let s={},l=0;function a(u){let c=l;o.children(u).forEach(a),s[u]={low:c,lim:l++}}return o.children().forEach(a),s}}),Yb=We((e,t)=>{var n=at();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),c=o(a),d=Object.values(c),h=n.applyWithChunking(Math.max,d)-1,p=2*h+1;a.graph().nestingRoot=u,a.edges().forEach(x=>a.edge(x).minlen*=p);let y=s(a)+1;a.children().forEach(x=>i(a,u,p,y,h,c,x)),a.graph().nodeRankFactor=p}function i(a,u,c,d,h,p,y){let x=a.children(y);if(!x.length){y!==u&&a.setEdge(u,y,{weight:0,minlen:c});return}let S=n.addBorderNode(a,"_bt"),v=n.addBorderNode(a,"_bb"),m=a.node(y);a.setParent(S,y),m.borderTop=S,a.setParent(v,y),m.borderBottom=v,x.forEach(g=>{i(a,u,c,d,h,p,g);let w=a.node(g),$=w.borderTop?w.borderTop:g,k=w.borderBottom?w.borderBottom:g,_=w.borderTop?d:2*d,N=$!==k?1:h-p[y]+1;a.setEdge(S,$,{weight:_,minlen:N,nestingEdge:!0}),a.setEdge(k,v,{weight:_,minlen:N,nestingEdge:!0})}),a.parent(y)||a.setEdge(u,S,{weight:0,minlen:h+p[y]})}function o(a){var u={};function c(d,h){var p=a.children(d);p&&p.length&&p.forEach(y=>c(y,h+1)),u[d]=h}return a.children().forEach(d=>c(d,1)),u}function s(a){return a.edges().reduce((u,c)=>u+a.edge(c).weight,0)}function l(a){var u=a.graph();a.removeNode(u.nestingRoot),delete u.nestingRoot,a.edges().forEach(c=>{var d=a.edge(c);d.nestingEdge&&a.removeEdge(c)})}}),Xb=We((e,t)=>{var n=at();t.exports=r;function r(o){function s(l){let a=o.children(l),u=o.node(l);if(a.length&&a.forEach(s),Object.hasOwn(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(let c=u.minRank,d=u.maxRank+1;c<d;++c)i(o,"borderLeft","_bl",l,u,c),i(o,"borderRight","_br",l,u,c)}}o.children().forEach(s)}function i(o,s,l,a,u,c){let d={width:0,height:0,rank:c,borderType:s},h=u[s][c-1],p=n.addDummyNode(o,"border",d,l);u[s][c]=p,o.setParent(p,a),h&&o.setEdge(h,p,{weight:1})}}),Qb=We((e,t)=>{t.exports={adjust:n,undo:r};function n(c){let d=c.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&i(c)}function r(c){let d=c.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&s(c),(d==="lr"||d==="rl")&&(a(c),i(c))}function i(c){c.nodes().forEach(d=>o(c.node(d))),c.edges().forEach(d=>o(c.edge(d)))}function o(c){let d=c.width;c.width=c.height,c.height=d}function s(c){c.nodes().forEach(d=>l(c.node(d))),c.edges().forEach(d=>{let h=c.edge(d);h.points.forEach(l),Object.hasOwn(h,"y")&&l(h)})}function l(c){c.y=-c.y}function a(c){c.nodes().forEach(d=>u(c.node(d))),c.edges().forEach(d=>{let h=c.edge(d);h.points.forEach(u),Object.hasOwn(h,"x")&&u(h)})}function u(c){let d=c.x;c.x=c.y,c.y=d}}),Zb=We((e,t)=>{var n=at();t.exports=r;function r(i){let o={},s=i.nodes().filter(d=>!i.children(d).length),l=s.map(d=>i.node(d).rank),a=n.applyWithChunking(Math.max,l),u=n.range(a+1).map(()=>[]);function c(d){if(o[d])return;o[d]=!0;let h=i.node(d);u[h.rank].push(d),i.successors(d).forEach(c)}return s.sort((d,h)=>i.node(d).rank-i.node(h).rank).forEach(c),u}}),Jb=We((e,t)=>{var n=at().zipObject;t.exports=r;function r(o,s){let l=0;for(let a=1;a<s.length;++a)l+=i(o,s[a-1],s[a]);return l}function i(o,s,l){let a=n(l,l.map((y,x)=>x)),u=s.flatMap(y=>o.outEdges(y).map(x=>({pos:a[x.w],weight:o.edge(x).weight})).sort((x,S)=>x.pos-S.pos)),c=1;for(;c<l.length;)c<<=1;let d=2*c-1;c-=1;let h=new Array(d).fill(0),p=0;return u.forEach(y=>{let x=y.pos+c;h[x]+=y.weight;let S=0;for(;x>0;)x%2&&(S+=h[x+1]),x=x-1>>1,h[x]+=y.weight;p+=y.weight*S}),p}}),e1=We((e,t)=>{t.exports=n;function n(r,i=[]){return i.map(o=>{let s=r.inEdges(o);if(s.length){let l=s.reduce((a,u)=>{let c=r.edge(u),d=r.node(u.v);return{sum:a.sum+c.weight*d.order,weight:a.weight+c.weight}},{sum:0,weight:0});return{v:o,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:o}})}}),t1=We((e,t)=>{var n=at();t.exports=r;function r(s,l){let a={};s.forEach((c,d)=>{let h=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};c.barycenter!==void 0&&(h.barycenter=c.barycenter,h.weight=c.weight)}),l.edges().forEach(c=>{let d=a[c.v],h=a[c.w];d!==void 0&&h!==void 0&&(h.indegree++,d.out.push(a[c.w]))});let u=Object.values(a).filter(c=>!c.indegree);return i(u)}function i(s){let l=[];function a(c){return d=>{d.merged||(d.barycenter===void 0||c.barycenter===void 0||d.barycenter>=c.barycenter)&&o(c,d)}}function u(c){return d=>{d.in.push(c),--d.indegree===0&&s.push(d)}}for(;s.length;){let c=s.pop();l.push(c),c.in.reverse().forEach(a(c)),c.out.forEach(u(c))}return l.filter(c=>!c.merged).map(c=>n.pick(c,["vs","i","barycenter","weight"]))}function o(s,l){let a=0,u=0;s.weight&&(a+=s.barycenter*s.weight,u+=s.weight),l.weight&&(a+=l.barycenter*l.weight,u+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/u,s.weight=u,s.i=Math.min(l.i,s.i),l.merged=!0}}),n1=We((e,t)=>{var n=at();t.exports=r;function r(s,l){let a=n.partition(s,S=>Object.hasOwn(S,"barycenter")),u=a.lhs,c=a.rhs.sort((S,v)=>v.i-S.i),d=[],h=0,p=0,y=0;u.sort(o(!!l)),y=i(d,c,y),u.forEach(S=>{y+=S.vs.length,d.push(S.vs),h+=S.barycenter*S.weight,p+=S.weight,y=i(d,c,y)});let x={vs:d.flat(!0)};return p&&(x.barycenter=h/p,x.weight=p),x}function i(s,l,a){let u;for(;l.length&&(u=l[l.length-1]).i<=a;)l.pop(),s.push(u.vs),a++;return a}function o(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}}),r1=We((e,t)=>{var n=e1(),r=t1(),i=n1();t.exports=o;function o(a,u,c,d){let h=a.children(u),p=a.node(u),y=p?p.borderLeft:void 0,x=p?p.borderRight:void 0,S={};y&&(h=h.filter(w=>w!==y&&w!==x));let v=n(a,h);v.forEach(w=>{if(a.children(w.v).length){let $=o(a,w.v,c,d);S[w.v]=$,Object.hasOwn($,"barycenter")&&l(w,$)}});let m=r(v,c);s(m,S);let g=i(m,d);if(y&&(g.vs=[y,g.vs,x].flat(!0),a.predecessors(y).length)){let w=a.node(a.predecessors(y)[0]),$=a.node(a.predecessors(x)[0]);Object.hasOwn(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+w.order+$.order)/(g.weight+2),g.weight+=2}return g}function s(a,u){a.forEach(c=>{c.vs=c.vs.flatMap(d=>u[d]?u[d].vs:d)})}function l(a,u){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight):(a.barycenter=u.barycenter,a.weight=u.weight)}}),i1=We((e,t)=>{var n=Sn().Graph,r=at();t.exports=i;function i(s,l,a,u){u||(u=s.nodes());let c=o(s),d=new n({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(h=>s.node(h));return u.forEach(h=>{let p=s.node(h),y=s.parent(h);(p.rank===l||p.minRank<=l&&l<=p.maxRank)&&(d.setNode(h),d.setParent(h,y||c),s[a](h).forEach(x=>{let S=x.v===h?x.w:x.v,v=d.edge(S,h),m=v!==void 0?v.weight:0;d.setEdge(S,h,{weight:s.edge(x).weight+m})}),Object.hasOwn(p,"minRank")&&d.setNode(h,{borderLeft:p.borderLeft[l],borderRight:p.borderRight[l]}))}),d}function o(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),o1=We((e,t)=>{t.exports=n;function n(r,i,o){let s={},l;o.forEach(a=>{let u=r.parent(a),c,d;for(;u;){if(c=r.parent(u),c?(d=s[c],s[c]=u):(d=l,l=u),d&&d!==u){i.setEdge(d,u);return}u=c}})}}),s1=We((e,t)=>{var n=Zb(),r=Jb(),i=r1(),o=i1(),s=o1(),l=Sn().Graph,a=at();t.exports=u;function u(p,y={}){if(typeof y.customOrder=="function"){y.customOrder(p,u);return}let x=a.maxRank(p),S=c(p,a.range(1,x+1),"inEdges"),v=c(p,a.range(x-1,-1,-1),"outEdges"),m=n(p);if(h(p,m),y.disableOptimalOrderHeuristic)return;let g=Number.POSITIVE_INFINITY,w,$=y.constraints||[];for(let k=0,_=0;_<4;++k,++_){d(k%2?S:v,k%4>=2,$),m=a.buildLayerMatrix(p);let N=r(p,m);N<g?(_=0,w=Object.assign({},m),g=N):N===g&&(w=structuredClone(m))}h(p,w)}function c(p,y,x){let S=new Map,v=(m,g)=>{S.has(m)||S.set(m,[]),S.get(m).push(g)};for(let m of p.nodes()){let g=p.node(m);if(typeof g.rank=="number"&&v(g.rank,m),typeof g.minRank=="number"&&typeof g.maxRank=="number")for(let w=g.minRank;w<=g.maxRank;w++)w!==g.rank&&v(w,m)}return y.map(function(m){return o(p,m,x,S.get(m)||[])})}function d(p,y,x){let S=new l;p.forEach(function(v){x.forEach(w=>S.setEdge(w.left,w.right));let m=v.graph().root,g=i(v,m,S,y);g.vs.forEach((w,$)=>v.node(w).order=$),s(v,S,g.vs)})}function h(p,y){Object.values(y).forEach(x=>x.forEach((S,v)=>p.node(S).order=v))}}),l1=We((e,t)=>{var n=Sn().Graph,r=at();t.exports={positionX:x,findType1Conflicts:i,findType2Conflicts:o,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:p,findSmallestWidthAlignment:h,balance:y};function i(m,g){let w={};function $(k,_){let N=0,D=0,E=k.length,O=_[_.length-1];return _.forEach((C,A)=>{let R=s(m,C),q=R?m.node(R).order:E;(R||C===O)&&(_.slice(D,A+1).forEach(B=>{m.predecessors(B).forEach(V=>{let z=m.node(V),U=z.order;(U<N||q<U)&&!(z.dummy&&m.node(B).dummy)&&l(w,V,B)})}),D=A+1,N=q)}),_}return g.length&&g.reduce($),w}function o(m,g){let w={};function $(_,N,D,E,O){let C;r.range(N,D).forEach(A=>{C=_[A],m.node(C).dummy&&m.predecessors(C).forEach(R=>{let q=m.node(R);q.dummy&&(q.order<E||q.order>O)&&l(w,R,C)})})}function k(_,N){let D=-1,E,O=0;return N.forEach((C,A)=>{if(m.node(C).dummy==="border"){let R=m.predecessors(C);R.length&&(E=m.node(R[0]).order,$(N,O,A,D,E),O=A,D=E)}$(N,O,N.length,E,_.length)}),N}return g.length&&g.reduce(k),w}function s(m,g){if(m.node(g).dummy)return m.predecessors(g).find(w=>m.node(w).dummy)}function l(m,g,w){if(g>w){let k=g;g=w,w=k}let $=m[g];$||(m[g]=$={}),$[w]=!0}function a(m,g,w){if(g>w){let $=g;g=w,w=$}return!!m[g]&&Object.hasOwn(m[g],w)}function u(m,g,w,$){let k={},_={},N={};return g.forEach(D=>{D.forEach((E,O)=>{k[E]=E,_[E]=E,N[E]=O})}),g.forEach(D=>{let E=-1;D.forEach(O=>{let C=$(O);if(C.length){C=C.sort((R,q)=>N[R]-N[q]);let A=(C.length-1)/2;for(let R=Math.floor(A),q=Math.ceil(A);R<=q;++R){let B=C[R];_[O]===O&&E<N[B]&&!a(w,O,B)&&(_[B]=O,_[O]=k[O]=k[B],E=N[B])}}})}),{root:k,align:_}}function c(m,g,w,$,k){let _={},N=d(m,g,w,k),D=k?"borderLeft":"borderRight";function E(A,R){let q=N.nodes().slice(),B={},V=q.pop();for(;V;){if(B[V])A(V);else{B[V]=!0,q.push(V);for(let z of R(V))q.push(z)}V=q.pop()}}function O(A){_[A]=N.inEdges(A).reduce((R,q)=>Math.max(R,_[q.v]+N.edge(q)),0)}function C(A){let R=N.outEdges(A).reduce((B,V)=>Math.min(B,_[V.w]-N.edge(V)),Number.POSITIVE_INFINITY),q=m.node(A);R!==Number.POSITIVE_INFINITY&&q.borderType!==D&&(_[A]=Math.max(_[A],R))}return E(O,N.predecessors.bind(N)),E(C,N.successors.bind(N)),Object.keys($).forEach(A=>_[A]=_[w[A]]),_}function d(m,g,w,$){let k=new n,_=m.graph(),N=S(_.nodesep,_.edgesep,$);return g.forEach(D=>{let E;D.forEach(O=>{let C=w[O];if(k.setNode(C),E){var A=w[E],R=k.edge(A,C);k.setEdge(A,C,Math.max(N(m,O,E),R||0))}E=O})}),k}function h(m,g){return Object.values(g).reduce((w,$)=>{let k=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;Object.entries($).forEach(([D,E])=>{let O=v(m,D)/2;k=Math.max(E+O,k),_=Math.min(E-O,_)});let N=k-_;return N<w[0]&&(w=[N,$]),w},[Number.POSITIVE_INFINITY,null])[1]}function p(m,g){let w=Object.values(g),$=r.applyWithChunking(Math.min,w),k=r.applyWithChunking(Math.max,w);["u","d"].forEach(_=>{["l","r"].forEach(N=>{let D=_+N,E=m[D];if(E===g)return;let O=Object.values(E),C=$-r.applyWithChunking(Math.min,O);N!=="l"&&(C=k-r.applyWithChunking(Math.max,O)),C&&(m[D]=r.mapValues(E,A=>A+C))})})}function y(m,g){return r.mapValues(m.ul,(w,$)=>{if(g)return m[g.toLowerCase()][$];{let k=Object.values(m).map(_=>_[$]).sort((_,N)=>_-N);return(k[1]+k[2])/2}})}function x(m){let g=r.buildLayerMatrix(m),w=Object.assign(i(m,g),o(m,g)),$={},k;["u","d"].forEach(N=>{k=N==="u"?g:Object.values(g).reverse(),["l","r"].forEach(D=>{D==="r"&&(k=k.map(A=>Object.values(A).reverse()));let E=(N==="u"?m.predecessors:m.successors).bind(m),O=u(m,k,w,E),C=c(m,k,O.root,O.align,D==="r");D==="r"&&(C=r.mapValues(C,A=>-A)),$[N+D]=C})});let _=h(m,$);return p($,_),y($,m.graph().align)}function S(m,g,w){return($,k,_)=>{let N=$.node(k),D=$.node(_),E=0,O;if(E+=N.width/2,Object.hasOwn(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":O=-N.width/2;break;case"r":O=N.width/2;break}if(O&&(E+=w?O:-O),O=0,E+=(N.dummy?g:m)/2,E+=(D.dummy?g:m)/2,E+=D.width/2,Object.hasOwn(D,"labelpos"))switch(D.labelpos.toLowerCase()){case"l":O=D.width/2;break;case"r":O=-D.width/2;break}return O&&(E+=w?O:-O),O=0,E}}function v(m,g){return m.node(g).width}}),a1=We((e,t)=>{var n=at(),r=l1().positionX;t.exports=i;function i(s){s=n.asNonCompoundGraph(s),o(s),Object.entries(r(s)).forEach(([l,a])=>s.node(l).x=a)}function o(s){let l=n.buildLayerMatrix(s),a=s.graph().ranksep,u=s.graph().rankalign,c=0;l.forEach(d=>{let h=d.reduce((p,y)=>{let x=s.node(y).height;return p>x?p:x},0);d.forEach(p=>{let y=s.node(p);u==="top"?y.y=c+y.height/2:u==="bottom"?y.y=c+h-y.height/2:y.y=c+h/2}),c+=h+a})}}),u1=We((e,t)=>{var n=Wb(),r=Vb(),i=Kb(),o=at().normalizeRanks,s=Gb(),l=at().removeEmptyRanks,a=Yb(),u=Xb(),c=Qb(),d=s1(),h=a1(),p=at(),y=Sn().Graph;t.exports=x;function x(L,F={}){let K=F.debugTiming?p.time:p.notime;return K("layout",()=>{let Z=K(" buildLayoutGraph",()=>E(L));return K(" runLayout",()=>S(Z,K,F)),K(" updateInputGraph",()=>v(L,Z)),Z})}function S(L,F,K){F(" makeSpaceForEdgeLabels",()=>O(L)),F(" removeSelfEdges",()=>b(L)),F(" acyclic",()=>n.run(L)),F(" nestingGraph.run",()=>a.run(L)),F(" rank",()=>i(p.asNonCompoundGraph(L))),F(" injectEdgeLabelProxies",()=>C(L)),F(" removeEmptyRanks",()=>l(L)),F(" nestingGraph.cleanup",()=>a.cleanup(L)),F(" normalizeRanks",()=>o(L)),F(" assignRankMinMax",()=>A(L)),F(" removeEdgeLabelProxies",()=>R(L)),F(" normalize.run",()=>r.run(L)),F(" parentDummyChains",()=>s(L)),F(" addBorderSegments",()=>u(L)),F(" order",()=>d(L,K)),F(" insertSelfEdges",()=>Q(L)),F(" adjustCoordinateSystem",()=>c.adjust(L)),F(" position",()=>h(L)),F(" positionSelfEdges",()=>H(L)),F(" removeBorderNodes",()=>U(L)),F(" normalize.undo",()=>r.undo(L)),F(" fixupEdgeLabelCoords",()=>V(L)),F(" undoCoordinateSystem",()=>c.undo(L)),F(" translateGraph",()=>q(L)),F(" assignNodeIntersects",()=>B(L)),F(" reversePoints",()=>z(L)),F(" acyclic.undo",()=>n.undo(L))}function v(L,F){L.nodes().forEach(K=>{let Z=L.node(K),te=F.node(K);Z&&(Z.x=te.x,Z.y=te.y,Z.order=te.order,Z.rank=te.rank,F.children(K).length&&(Z.width=te.width,Z.height=te.height))}),L.edges().forEach(K=>{let Z=L.edge(K),te=F.edge(K);Z.points=te.points,Object.hasOwn(te,"x")&&(Z.x=te.x,Z.y=te.y)}),L.graph().width=F.graph().width,L.graph().height=F.graph().height}var m=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},w=["acyclicer","ranker","rankdir","align","rankalign"],$=["width","height","rank"],k={width:0,height:0},_=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},D=["labelpos"];function E(L){let F=new y({multigraph:!0,compound:!0}),K=P(L.graph());return F.setGraph(Object.assign({},g,j(K,m),p.pick(K,w))),L.nodes().forEach(Z=>{let te=P(L.node(Z)),ie=j(te,$);Object.keys(k).forEach(de=>{ie[de]===void 0&&(ie[de]=k[de])}),F.setNode(Z,ie),F.setParent(Z,L.parent(Z))}),L.edges().forEach(Z=>{let te=P(L.edge(Z));F.setEdge(Z,Object.assign({},N,j(te,_),p.pick(te,D)))}),F}function O(L){let F=L.graph();F.ranksep/=2,L.edges().forEach(K=>{let Z=L.edge(K);Z.minlen*=2,Z.labelpos.toLowerCase()!=="c"&&(F.rankdir==="TB"||F.rankdir==="BT"?Z.width+=Z.labeloffset:Z.height+=Z.labeloffset)})}function C(L){L.edges().forEach(F=>{let K=L.edge(F);if(K.width&&K.height){let Z=L.node(F.v),te={rank:(L.node(F.w).rank-Z.rank)/2+Z.rank,e:F};p.addDummyNode(L,"edge-proxy",te,"_ep")}})}function A(L){let F=0;L.nodes().forEach(K=>{let Z=L.node(K);Z.borderTop&&(Z.minRank=L.node(Z.borderTop).rank,Z.maxRank=L.node(Z.borderBottom).rank,F=Math.max(F,Z.maxRank))}),L.graph().maxRank=F}function R(L){L.nodes().forEach(F=>{let K=L.node(F);K.dummy==="edge-proxy"&&(L.edge(K.e).labelRank=K.rank,L.removeNode(F))})}function q(L){let F=Number.POSITIVE_INFINITY,K=0,Z=Number.POSITIVE_INFINITY,te=0,ie=L.graph(),de=ie.marginx||0,_e=ie.marginy||0;function fe(ye){let Te=ye.x,ce=ye.y,M=ye.width,J=ye.height;F=Math.min(F,Te-M/2),K=Math.max(K,Te+M/2),Z=Math.min(Z,ce-J/2),te=Math.max(te,ce+J/2)}L.nodes().forEach(ye=>fe(L.node(ye))),L.edges().forEach(ye=>{let Te=L.edge(ye);Object.hasOwn(Te,"x")&&fe(Te)}),F-=de,Z-=_e,L.nodes().forEach(ye=>{let Te=L.node(ye);Te.x-=F,Te.y-=Z}),L.edges().forEach(ye=>{let Te=L.edge(ye);Te.points.forEach(ce=>{ce.x-=F,ce.y-=Z}),Object.hasOwn(Te,"x")&&(Te.x-=F),Object.hasOwn(Te,"y")&&(Te.y-=Z)}),ie.width=K-F+de,ie.height=te-Z+_e}function B(L){L.edges().forEach(F=>{let K=L.edge(F),Z=L.node(F.v),te=L.node(F.w),ie,de;K.points?(ie=K.points[0],de=K.points[K.points.length-1]):(K.points=[],ie=te,de=Z),K.points.unshift(p.intersectRect(Z,ie)),K.points.push(p.intersectRect(te,de))})}function V(L){L.edges().forEach(F=>{let K=L.edge(F);if(Object.hasOwn(K,"x"))switch((K.labelpos==="l"||K.labelpos==="r")&&(K.width-=K.labeloffset),K.labelpos){case"l":K.x-=K.width/2+K.labeloffset;break;case"r":K.x+=K.width/2+K.labeloffset;break}})}function z(L){L.edges().forEach(F=>{let K=L.edge(F);K.reversed&&K.points.reverse()})}function U(L){L.nodes().forEach(F=>{if(L.children(F).length){let K=L.node(F),Z=L.node(K.borderTop),te=L.node(K.borderBottom),ie=L.node(K.borderLeft[K.borderLeft.length-1]),de=L.node(K.borderRight[K.borderRight.length-1]);K.width=Math.abs(de.x-ie.x),K.height=Math.abs(te.y-Z.y),K.x=ie.x+K.width/2,K.y=Z.y+K.height/2}}),L.nodes().forEach(F=>{L.node(F).dummy==="border"&&L.removeNode(F)})}function b(L){L.edges().forEach(F=>{if(F.v===F.w){var K=L.node(F.v);K.selfEdges||(K.selfEdges=[]),K.selfEdges.push({e:F,label:L.edge(F)}),L.removeEdge(F)}})}function Q(L){var F=p.buildLayerMatrix(L);F.forEach(K=>{var Z=0;K.forEach((te,ie)=>{var de=L.node(te);de.order=ie+Z,(de.selfEdges||[]).forEach(_e=>{p.addDummyNode(L,"selfedge",{width:_e.label.width,height:_e.label.height,rank:de.rank,order:ie+ ++Z,e:_e.e,label:_e.label},"_se")}),delete de.selfEdges})})}function H(L){L.nodes().forEach(F=>{var K=L.node(F);if(K.dummy==="selfedge"){var Z=L.node(K.e.v),te=Z.x+Z.width/2,ie=Z.y,de=K.x-te,_e=Z.height/2;L.setEdge(K.e,K.label),L.removeNode(F),K.label.points=[{x:te+2*de/3,y:ie-_e},{x:te+5*de/6,y:ie-_e},{x:te+de,y:ie},{x:te+5*de/6,y:ie+_e},{x:te+2*de/3,y:ie+_e}],K.label.x=K.x,K.label.y=K.y}})}function j(L,F){return p.mapValues(p.pick(L,F),Number)}function P(L){var F={};return L&&Object.entries(L).forEach(([K,Z])=>{typeof K=="string"&&(K=K.toLowerCase()),F[K]=Z}),F}}),c1=We((e,t)=>{var n=at(),r=Sn().Graph;t.exports={debugOrdering:i};function i(o){let s=n.buildLayerMatrix(o),l=new r({compound:!0,multigraph:!0}).setGraph({});return o.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+o.node(a).rank)}),o.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,u)=>{let c="layer"+u;l.setNode(c,{rank:"same"}),a.reduce((d,h)=>(l.setEdge(d,h,{style:"invis"}),h))}),l}}),d1=We((e,t)=>{t.exports="2.0.4"}),f1=We((e,t)=>{t.exports={graphlib:Sn(),layout:u1(),debug:c1(),util:{time:at().time,notime:at().notime},version:d1()}});const dh=f1();/*! For license information please see dagre.esm.js.LEGAL.txt */const Lr=28,Dn=20,jv=20,Ba=10,p1=150;function _v(e,t){if(t==="all")return e.map(o=>({table:o,neighbor:!1}));const n=e.filter(o=>o.status!=="unchanged"),r=new Set(n.map(o=>o.name)),i=new Set;for(const o of n)for(const s of o.foreignKeys)r.has(s.table)||i.add(s.table);return e.filter(o=>r.has(o.name)||i.has(o.name)).map(o=>({table:o,neighbor:i.has(o.name)}))}function h1(e,t,n){const r=new Set(e.foreignKeys.flatMap(l=>l.columns)),i=l=>n||l.status!=="unchanged"||l.primary||r.has(l.name)||l.values||t.has(l.name),o=e.columns.filter(i).map(l=>({kind:"column",column:l,fk:r.has(l.name)})),s=e.columns.length-o.length;return s>0&&o.push({kind:"more",hidden:s}),o}function m1(e){const t=[];return e.otherChanges.constraints&&t.push(`制約 ${e.otherChanges.constraints}`),e.otherChanges.indexes&&t.push(`インデックス ${e.otherChanges.indexes}`),e.otherChanges.comment&&t.push("コメント"),t.length?`${t.join("・")} の変更`:void 0}function $v(e){return{name:e.name,type:e.beforeType?`${e.beforeType} → ${e.type}`:e.type}}function g1(e,t,n,r){const i=_v(e,t),o=new Set(i.map(x=>x.table.name)),s=new Map;for(const{table:x}of i)for(const S of x.foreignKeys){if(!o.has(S.table))continue;const v=s.get(S.table)??new Set;S.refColumns.forEach(m=>v.add(m)),s.set(S.table,v)}const l=new dh.graphlib.Graph({compound:!0,multigraph:!0});l.setGraph({rankdir:"LR",nodesep:28,ranksep:90,marginx:20,marginy:20}),l.setDefaultEdgeLabel(()=>({}));const a=i.map(({table:x,neighbor:S})=>{const v=h1(x,s.get(x.name)??new Set,n.has(x.name)),m=m1(x);let g=Math.max(p1,r(x.name,!0)+Ba*2+24);for(const $ of v){if($.kind==="more")continue;const k=$v($.column);g=Math.max(g,18+r(k.name)+16+r(k.type)+34+Ba*2)}m&&(g=Math.max(g,r(m)+Ba*2));const w=Lr+v.length*Dn+(m?jv:0)+4;return{table:x,neighbor:S,rows:v,footer:m,x:0,y:0,width:Math.ceil(g),height:w}}),u=[...new Set(a.map(x=>x.table.schema))];for(const x of u)l.setNode(`schema:${x}`,{label:x,paddingTop:26});for(const x of a)l.setNode(x.table.name,{width:x.width,height:x.height}),l.setParent(x.table.name,`schema:${x.table.schema}`);const c=[];for(const x of a)for(const S of x.table.foreignKeys){if(!o.has(S.table))continue;const v=a.find(g=>g.table.name===S.table),m=(g,w)=>!!w&&g.rows.some($=>$.kind==="column"&&$.column.name===w);c.push({fk:S,from:x.table.name,to:S.table,fromColumn:m(x,S.columns[0])?S.columns[0]:void 0,toColumn:m(v,S.refColumns[0])?S.refColumns[0]:void 0,points:[]}),S.table!==x.table.name&&l.setEdge(x.table.name,S.table,{},S.name)}dh.layout(l);for(const x of a){const S=l.node(x.table.name);x.x=S.x-x.width/2,x.y=S.y-x.height/2}const d=u.map(x=>{const S=l.node(`schema:${x}`);return{schema:x,x:S.x-S.width/2,y:S.y-S.height/2,width:S.width,height:S.height}}),h=new Map(a.map(x=>[x.table.name,x]));for(const x of c)x.points=y1(h.get(x.from),x.fromColumn,h.get(x.to),x.toColumn);const p=Math.max(0,...a.map(x=>x.x+x.width),...d.map(x=>x.x+x.width)),y=Math.max(0,...a.map(x=>x.y+x.height),...d.map(x=>x.y+x.height));return{tables:a,edges:c,groups:d,width:p+20,height:y+20}}function fh(e,t){const n=t?e.rows.findIndex(r=>r.kind==="column"&&r.column.name===t):-1;return n<0?e.y+Lr/2:e.y+Lr+n*Dn+Dn/2}function y1(e,t,n,r){const i=fh(e,t),o=fh(n,r);if(e===n){const d=e.x+e.width;return[{x:d,y:i},{x:d+28,y:i},{x:d+28,y:o},{x:d,y:o}]}const s=e.x+e.width/2,a=n.x+n.width/2>=s,u=a?e.x+e.width:e.x,c=a?n.x:n.x+n.width;return[{x:u,y:i},{x:c,y:o}]}function v1(e){if(e.length!==2)return`M ${e.map(i=>`${i.x} ${i.y}`).join(" L ")}`;const[t,n]=e,r=Math.max(30,Math.abs(n.x-t.x)/2)*(n.x>=t.x?1:-1);return`M ${t.x} ${t.y} C ${t.x+r} ${t.y}, ${n.x-r} ${n.y}, ${n.x} ${n.y}`}const x1={added:"+",removed:"−",modified:"~",unchanged:""},Tv="12px ui-monospace, SFMono-Regular, Menlo, monospace",w1=`600 ${Tv}`;function k1(){return T.useMemo(()=>{const e=document.createElement("canvas").getContext("2d");return(t,n)=>e?(e.font=n?w1:Tv,e.measureText(t).width):t.length*7.4},[])}const b1=T.forwardRef(function({tables:t,mode:n,values:r,selected:i,reviewed:o,comments:s,onSelect:l,found:a},u){const c=k1(),[d,h]=T.useState(new Set),[p,y]=T.useState(null),[x,S]=T.useState({x:0,y:0,k:1}),v=T.useRef(null),m=T.useRef(null),g=T.useMemo(()=>g1(t,n,d,c),[t,n,d,c]),w=T.useMemo(()=>new Map(g.tables.map(C=>[C.table.name,C])),[g]),$=T.useRef(!1),k=T.useCallback(()=>{const C=v.current;if(!C||g.width===0)return;if(C.clientWidth===0||C.clientHeight===0){$.current=!0;return}$.current=!1;const A=Math.min(1.2,Math.max(.2,Math.min(C.clientWidth/g.width,C.clientHeight/g.height)));S({k:A,x:(C.clientWidth-g.width*A)/2,y:Math.max(0,(C.clientHeight-g.height*A)/2)})},[g]),_=g.tables.map(C=>C.table.name).join("|");T.useEffect(()=>{k()},[_]),T.useEffect(()=>{const C=v.current;if(!C)return;const A=new ResizeObserver(()=>{$.current&&k()});return A.observe(C),()=>A.disconnect()},[k]);const N=T.useCallback((C,A,R)=>{S(q=>{const B=Math.min(3,Math.max(.15,q.k*C));return{k:B,x:A-(A-q.x)*B/q.k,y:R-(R-q.y)*B/q.k}})},[]);T.useImperativeHandle(u,()=>({fit:k,zoom:C=>{const A=v.current;A&&N(C,A.clientWidth/2,A.clientHeight/2)},focus:(C,A,R=!1)=>E({name:C,column:A,zoom:R})}),[k,N]),T.useEffect(()=>{const C=v.current;if(!C)return;const A=R=>{R.preventDefault();const q=C.getBoundingClientRect();R.ctrlKey||R.metaKey?N(Math.exp(-R.deltaY*.01),R.clientX-q.left,R.clientY-q.top):S(B=>({...B,x:B.x-R.deltaX,y:B.y-R.deltaY}))};return C.addEventListener("wheel",A,{passive:!1}),()=>C.removeEventListener("wheel",A)},[N]);const[D,E]=T.useState(null);T.useEffect(()=>{if(!D)return;const C=w.get(D.name),A=v.current;let R;if(C&&D.column){const B=C.rows.findIndex(V=>V.kind==="column"&&V.column.name===D.column);if(B>=0)R=C.y+Lr+B*Dn+Dn/2;else if(!d.has(C.table.name)){h(V=>new Set(V).add(C.table.name));return}}if(E(null),!C||!A)return;const q=R??C.y+Math.min(C.height,200)/2;S(B=>{const V=D.zoom?Math.max(B.k,.9):B.k;return{k:V,x:A.clientWidth/2-(C.x+C.width/2)*V,y:A.clientHeight/3-q*V}})},[D,w,d]);const O=C=>p===C||i===C;return f.jsx("div",{ref:v,className:"er",onPointerDown:C=>{C.button===0&&(m.current={x:C.clientX,y:C.clientY,vx:x.x,vy:x.y,moved:!1,target:C.target},C.currentTarget.setPointerCapture(C.pointerId))},onPointerMove:C=>{const A=m.current;A&&(Math.abs(C.clientX-A.x)+Math.abs(C.clientY-A.y)>3&&(A.moved=!0),A.moved&&S(R=>({...R,x:A.vx+C.clientX-A.x,y:A.vy+C.clientY-A.y})))},onPointerUp:()=>{const C=m.current;if(m.current=null,C&&!C.moved){const A=C.target.closest("[data-table]"),R=C.target.closest("[data-more]");if(R){const q=R.getAttribute("data-more");h(B=>{const V=new Set(B);return V.has(q)?V.delete(q):V.add(q),V})}else l(A?A.getAttribute("data-table"):null)}},children:g.tables.length===0?f.jsx("div",{className:"er-empty",children:"表示するテーブルはありません"}):f.jsxs("svg",{width:"100%",height:"100%",children:[f.jsx("defs",{children:["added","removed","modified","unchanged"].map(C=>f.jsx("marker",{id:`arrow-${C}`,viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:f.jsx("path",{d:"M0,0 L10,5 L0,10 z",className:`arrow ${C}`})},C))}),f.jsxs("g",{transform:`translate(${x.x} ${x.y}) scale(${x.k})`,children:[g.groups.map(C=>f.jsxs("g",{className:"er-group",children:[f.jsx("rect",{x:C.x,y:C.y,width:C.width,height:C.height,rx:8}),f.jsx("text",{x:C.x+10,y:C.y+17,children:C.schema})]},C.schema)),g.edges.map(C=>{const A=O(C.from)||O(C.to);return f.jsx("path",{d:v1(C.points),className:`er-edge ${C.fk.status} ${A?"lit":""} ${p||i?A?"":"dim":""}`,markerEnd:`url(#arrow-${C.fk.status})`,children:f.jsxs("title",{children:[C.fk.name,": ",C.from,".",C.fk.columns.join(", ")," → ",C.to,".",C.fk.refColumns.join(", ")]})},`${C.from}:${C.fk.name}`)}),g.tables.map(C=>f.jsx(E1,{t:C,values:r,selected:i===C.table.name,reviewed:o.has(C.table.name),comments:s.tables.get(C.table.name)??0,commented:s.columns,expanded:d.has(C.table.name),found:(a==null?void 0:a.table)===C.table.name?a.column??!0:void 0,onHover:y},C.table.name))]})]})})});function E1({t:e,values:t,selected:n,reviewed:r,comments:i,commented:o,expanded:s,found:l,onHover:a}){const u=e.table.status;return f.jsxs("g",{className:`er-table ${u} ${e.neighbor?"neighbor":""} ${n?"selected":""} ${r?"reviewed":""} ${l===!0?"found":""}`,"data-table":e.table.name,transform:`translate(${e.x} ${e.y})`,onPointerEnter:()=>a(e.table.name),onPointerLeave:()=>a(null),children:[f.jsx("rect",{className:"er-box",width:e.width,height:e.height,rx:6}),f.jsx("rect",{className:"er-head",width:e.width,height:Lr,rx:6}),f.jsx("rect",{className:"er-head-fill",y:Lr-6,width:e.width,height:6}),f.jsxs("text",{className:"er-title",x:10,y:18,children:[f.jsxs("tspan",{className:"er-schema",children:[e.table.schema,"."]}),f.jsx("tspan",{children:e.table.table})]}),r&&f.jsx("text",{className:"er-check",x:e.width-(i>0?24:10),y:18,textAnchor:"end",children:"✓"}),e.rows.map((c,d)=>{const h=Lr+d*Dn;if(c.kind==="more")return f.jsxs("g",{className:"er-more","data-more":e.table.name,children:[f.jsx("rect",{y:h,width:e.width,height:Dn}),f.jsx("text",{x:10,y:h+14,children:s?"▴ たたむ":`▸ 他 ${c.hidden} カラム`})]},"more");const p=c.column,y=$v(p),x=t.get(`${e.table.name}.${p.name}`);return f.jsxs("g",{className:`er-row ${p.status}${l===p.name?" found":""}`,children:[f.jsx("rect",{y:h,width:e.width,height:Dn}),f.jsx("text",{x:8,y:h+14,className:`er-mark ${p.status}`,children:x1[p.status]}),f.jsxs("text",{x:20,y:h+14,className:"er-col",children:[p.primary&&f.jsx("tspan",{className:"er-key",children:"◆ "}),y.name]}),f.jsxs("text",{x:e.width-10,y:h+14,textAnchor:"end",className:"er-type",children:[c.fk&&f.jsx("tspan",{className:"er-fk",children:"FK "}),p.values&&f.jsx("tspan",{className:"er-values",children:"値± "}),p.beforeType?f.jsxs(f.Fragment,{children:[f.jsx("tspan",{className:"er-before",children:p.beforeType}),f.jsxs("tspan",{children:[" → ",p.type]})]}):p.type,p.notNull?"":f.jsx("tspan",{className:"er-null",children:"?"})]}),o.has(`${e.table.name}.${p.name}`)&&f.jsx("circle",{className:"er-cdot",cx:e.width-4,cy:h+Dn/2,r:2.5}),x&&f.jsx("title",{children:x})]},p.name)}),i>0&&f.jsxs("g",{className:"er-cbadge",transform:`translate(${e.width-4} 0)`,children:[f.jsxs("title",{children:["コメント ",i," 件"]}),f.jsx("rect",{x:-17,y:-9,width:34,height:18,rx:9}),f.jsx(Ri,{size:10,x:-11,y:-5}),f.jsx("text",{x:4,y:4,textAnchor:"middle",children:i})]}),e.footer&&f.jsx("text",{className:"er-footer",x:10,y:e.height-jv/2-1,children:e.footer})]})}const fi={side:260,panel:440},ph=180,hh=320,mh=320,Lv="dbshape.layout";function S1(){const e=Yt(Lv,{});return{side:typeof e.side=="number"&&e.side>0?e.side:fi.side,panel:typeof e.panel=="number"&&e.panel>0?e.panel:fi.panel}}const xs=e=>_t(Lv,e);function ws(e,t,n){const r=zr*(n?2:1);let i=e.panel;n&&(i=Math.max(mh,Math.min(i,t-r-ph-hh)));const o=t-r-(n?i:0);return{side:Math.max(ph,Math.min(e.side,o-hh)),panel:Math.max(mh,i)}}function C1(e,t){return[`${e.side}px`,`${zr}px`,"minmax(0, 1fr)",...t?[`${zr}px`,`${e.panel}px`]:[]].join(" ")}const N1=["table","column","constraint","index","value","type"];function j1(e){const t=/^([a-z]+):([^:]*):(.+)$/.exec(e);return!t||!N1.includes(t[1])?null:{kind:t[1],...t[2]?{table:t[2]}:{},name:t[3]}}function _1(e,t=""){const n=e.diff,r=(o,s)=>{const l=mv(e,o),a=l&&!l.base?` 定義: ${l.file}:${l.line}`:"";return`${" ".repeat(s)}- ${Po(o)}(${Gl(e,o)??"変更なし"})${a} target: "${t}${Ur(o)}"`},i=[];for(const o of n.tables){i.push(r(gl(o.name),0));for(const s of o.columns)i.push(r({kind:"column",table:o.name,name:s.name},1));for(const s of o.constraints)i.push(r({kind:"constraint",table:o.name,name:s.name},1));for(const s of o.indexes)i.push(r({kind:"index",table:o.name,name:s.name},1))}for(const o of n.values)o.source==="check"&&o.table&&o.column&&i.push(r({kind:"value",table:o.table,name:o.column},0));for(const o of[...n.enums,...n.domains])i.push(r({kind:"type",name:o.name},0));return i.length===0?"":[`スキーマの SQL: ${ef(e.schemaFrom)}`,"変更:",...i].join(`
|
|
75
|
+
`)}const $1=["コメントの付け方:","- target: 上の target の値をそのまま","- path / side / line / endLine / code: null","- スキーマの設計を見てください(型、NULL を許すか、既定値、制約、外部キー、インデックス、値の制限、既存のテーブルとの揃い方、既存のデータへの影響など)。定義は SQL ファイルを読んで確かめてください。","- 一覧にないテーブルやカラムも同じ形の target で指せます(table:<schema.table>:<schema.table>、column:<schema.table>:<カラム名>)。"].join(`
|
|
76
|
+
`);function T1(e,t,n,r){const i=[];for(const o of e){if(!o.target||!o.target.startsWith(n))continue;const s=j1(o.target.slice(n.length));!s||!gv(t,s)&&Gl(t,s)===void 0||i.push({...yv(t,s,o.body),ai:r})}return i}const L1=e=>nf({repoRoot:e.repoRoot,baseLabel:e.base.label,targetLabel:e.target.label})+e.database.id,I1=[{status:"added",title:"新規テーブル"},{status:"modified",title:"変更したテーブル"},{status:"removed",title:"削除したテーブル"}];function A1({data:e,active:t,onComments:n,ai:r,aiPrefix:i,onAi:o,switcher:s}){const l=L1(e),[a,u]=T.useState(""),[c,d]=T.useState("changes"),[h,p]=T.useState(null),[y,x]=T.useState(()=>yb(l)),[S,v]=T.useState(()=>_b(l)),[m,g]=T.useState(null),[w,$]=T.useState(null),k=T.useRef(null),_=T.useRef(null),[N,D]=T.useState(null),E=T.useCallback(X=>{_.current=X,D(X)},[]),O=T.useRef(null),C=ov(_),[A,R]=T.useState(S1);T.useEffect(()=>{if(!t)return;const X=pe=>{pe.key==="Escape"&&!(pe.target instanceof HTMLElement&&pe.target.closest("textarea, input"))&&p(null)};return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[t]),T.useEffect(()=>{const X=S.filter(pe=>po(e,pe)!=="resolved").length;n({open:X,prompt:()=>vv(e,S).text,review:()=>_1(e,i)})},[e,S,i,n]);const q=T.useRef(S);q.current=S;const B=T.useRef(0),[V,z]=T.useState(null);T.useEffect(()=>{if(!r||r.seq===B.current)return;B.current=r.seq;const X=T1(r.items.filter(pe=>pe.module==="db"),e,i,r.agent);if(X.length){const pe=[...q.current,...X];v(pe),lh(l,pe)}z({seq:r.seq,placed:X.length,dropped:0})},[r,e,i,l]),T.useEffect(()=>{V&&o(V)},[V,o]);const U=e.diff.tables,b=T.useMemo(()=>new Set(U.map(X=>X.name)),[U]),Q=X=>y[X.name]===co(X),H=T.useMemo(()=>new Set(U.filter(X=>y[X.name]===co(X)).map(X=>X.name)),[U,y]),j=T.useMemo(()=>{const X=new Map;for(const pe of e.diff.values){const W=Kl(pe.before,pe.after).map(me=>me.status==="added"?`+${me.value}`:me.status==="removed"?`−${me.value}`:me.value).join(" "),ne=pe.source==="check"?[`${pe.table}.${pe.column}`]:pe.usedBy??[];for(const me of ne)X.set(me,`値: ${W}`)}return X},[e]),P=T.useMemo(()=>{const X=new Map,pe=new Set;for(const W of S)po(e,W)==="resolved"||!W.target.table||(X.set(W.target.table,(X.get(W.target.table)??0)+1),(W.target.kind==="column"||W.target.kind==="value")&&pe.add(`${W.target.table}.${W.target.name}`));return{tables:X,columns:pe}},[e,S]),L=e.diff,F=(X,pe)=>{const W={...y};pe?W[X.name]=co(X):delete W[X.name],x(W),vb(l,W)},K=(X,pe=!0)=>{p({kind:"table",name:X}),pe&&window.setTimeout(()=>{var W;return(W=k.current)==null?void 0:W.focus(X)},0)},Z=X=>{v(X),lh(l,X)},te={data:e,comments:S,composing:m,editing:w,compose:X=>{g(X?Ur(X):null),$(null)},edit:X=>{$(X),g(null)},add:(X,pe)=>{Z([...S,yv(e,X,pe)]),g(null)},update:(X,pe)=>{Z(S.map(W=>W.id===X?{...W,body:pe}:W)),$(null)},remove:X=>Z(S.filter(pe=>pe.id!==X))},ie=X=>{X.table?K(X.table):p({kind:"type",name:X.name}),window.setTimeout(()=>{var pe;return(pe=document.getElementById(`c-${Ur(X)}`))==null?void 0:pe.scrollIntoView({block:"center",behavior:"smooth"})},50)},de=U.filter(X=>Eb(X,a)),_e=[...L.enums.map(X=>({kind:"ENUM 型",change:X})),...L.domains.map(X=>({kind:"DOMAIN",change:X}))],fe=U.filter(Q).length,ye=Xd(t),Te=T.useMemo(()=>[...L.enums,...L.domains].map(X=>X.name),[L]),ce=T.useMemo(()=>ye.open?Sb(e.er,Te,ye.query,ye.caseSensitive,Br):[],[e,Te,ye.open,ye.query,ye.caseSensitive]),M=ce[ql(ye,ce.length)]??null;T.useEffect(()=>{if(!(!ye.open||!M)){if(M.kind==="type"){p({kind:"type",name:M.name});return}_v(e.er,c).some(X=>X.table.name===M.table)||d("all"),p({kind:"table",name:M.table}),window.setTimeout(()=>{var X;return(X=k.current)==null?void 0:X.focus(M.table,M.kind==="column"?M.column:void 0,!0)},0)}},[ye.seq]),Jd({root:N,selector:".side .iname, .panel-title, .panel .cname",find:ye,on:t,current:()=>{if(!M||!N)return null;const X=M.kind==="column"?[...N.querySelectorAll(".panel .cname")].find(pe=>pe.textContent===M.column):N.querySelector(".panel-title");return X?{el:X,nth:0}:null}});const J=ye.open&&M&&M.kind!=="type"?{table:M.table,column:M.kind==="column"?M.column:void 0}:null,ee=h,he=(ee==null?void 0:ee.kind)==="table"?U.find(X=>X.name===ee.name):void 0,ge=(ee==null?void 0:ee.kind)==="table"?e.er.find(X=>X.name===ee.name):void 0,xe=(ee==null?void 0:ee.kind)==="table"?L.values.filter(X=>{var pe;return X.table===ee.name||((pe=X.usedBy)==null?void 0:pe.some(W=>W.startsWith(`${ee.name}.`)))}):[],Oe=(ee==null?void 0:ee.kind)==="type"?_e.find(X=>X.change.name===ee.name):void 0,ot=U.length===0&&L.values.length===0&&_e.length===0;return f.jsx(xv.Provider,{value:te,children:f.jsxs("div",{className:"app",children:[f.jsxs(Vd,{children:[s,f.jsxs(qd,{children:[f.jsx(_i,{children:"テーブル"}),f.jsx(Wd,{stats:{added:U.filter(X=>X.status==="added").length,modified:U.filter(X=>X.status==="modified").length,removed:U.filter(X=>X.status==="removed").length},unit:"テーブル",showZero:!0}),f.jsx(Kd,{}),f.jsx(_i,{children:"値の変化"}),f.jsx("span",{className:`vcount${L.values.length?"":" zero"}`,title:"CHECK や ENUM などの値の変化",children:L.values.length})]}),f.jsx(Gd,{}),f.jsx(Zd,{find:ye,count:ce.length,placeholder:"テーブル名・カラム名を検索"}),f.jsx(Yd,{done:fe,total:U.length,title:"確認済みにしたテーブル(内容が変わると外れます)"})]}),f.jsxs("div",{className:`body ${ee?"with-panel":""}`,ref:E,style:{gridTemplateColumns:C1(C?ws(A,C,!!ee):A,!!ee)},children:[f.jsxs("nav",{className:"side",ref:O,children:[f.jsx("input",{className:"filter",placeholder:"テーブル・カラムで絞り込み",value:a,onChange:X=>u(X.target.value)}),I1.map(X=>{const pe=de.filter(W=>W.status===X.status);return f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:[X.title," ",f.jsx("span",{className:"muted",children:pe.length})]}),pe.map(W=>{const ne=fv(W),me=P.tables.get(W.name)??0,ve=Q(W);return f.jsxs("div",{className:`item-row tinted ${W.status}${ve?" reviewed":""}${(ee==null?void 0:ee.name)===W.name?" current":""}`,children:[f.jsxs("button",{className:"item",onClick:()=>K(W.name),title:W.name,children:[f.jsxs("span",{className:"iname",children:[f.jsxs("span",{className:"schema",children:[W.schema,"."]}),W.table]}),f.jsx(Oi,{stats:ne,title:dv(ne)}),me>0&&f.jsx(Mo,{n:me,title:"このテーブルへの未対応のコメント"})]}),f.jsx("button",{className:`ireview${ve?" on":""}`,onClick:()=>F(W,!ve),title:ve?"確認済み(クリックで外す)":"確認済みにする(テーブルがまた変わると外れます)","aria-label":ve?"確認済みを外す":"確認済みにする","aria-pressed":ve,children:f.jsx(nb,{size:12})})]},W.name)})]},X.status)}),f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["値の変化 ",f.jsx("span",{className:"muted",children:L.values.length})]}),L.values.map((X,pe)=>{const W=pv(X);return f.jsx("button",{className:"item tinted values",onClick:()=>W.table?K(W.table):X.type&&p({kind:"type",name:X.type}),children:f.jsx("span",{className:"iname",children:W.label})},pe)})]}),S.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["コメント ",f.jsx("span",{className:"muted",children:S.length})]}),S.map(X=>{const pe=po(e,X);return f.jsxs("div",{className:`item comment-item ${pe}`,role:"button",tabIndex:0,onClick:()=>ie(X.target),onKeyDown:W=>W.key==="Enter"&&ie(X.target),title:`${Po(X.target)}
|
|
77
|
+
${X.body}`,children:[f.jsx("span",{className:"mark cmark",children:f.jsx(Ri,{size:12})}),f.jsxs("span",{className:"iname",children:[f.jsx("span",{className:"ctarget",children:Po(X.target)}),f.jsx("span",{className:"cline",children:X.body.split(`
|
|
78
|
+
`)[0]})]}),pe!=="open"&&f.jsx("span",{className:`cstate ${pe}`,children:Tb[pe]}),f.jsx("button",{className:"cdel","aria-label":"削除",title:"このコメントを削除",onClick:W=>{W.stopPropagation(),te.remove(X.id)},children:"×"})]},X.id)})]}),_e.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["型 ",f.jsx("span",{className:"muted",children:_e.length})]}),_e.map(X=>f.jsx("button",{className:`item tinted ${X.change.status}${(ee==null?void 0:ee.name)===X.change.name?" current":""}`,onClick:()=>p({kind:"type",name:X.change.name}),children:f.jsx("span",{className:"iname",children:X.change.name})},X.change.name))]}),f.jsxs("div",{className:"side-foot muted",children:[f.jsxs("div",{children:["変更のないテーブル ",L.unchangedTables]}),f.jsxs("details",{children:[f.jsxs("summary",{children:["スキーマ ",e.target.files.length," ファイル(",ef(e.schemaFrom),")"]}),f.jsx("ul",{children:e.target.files.map(X=>f.jsx("li",{children:X},X))})]}),e.ignored.length>0&&f.jsxs("details",{children:[f.jsxs("summary",{children:["比較していない文 ",e.ignored.reduce((X,pe)=>X+pe.count,0)]}),f.jsx("ul",{children:e.ignored.map(X=>f.jsxs("li",{children:[X.statement," ",X.count]},X.statement))})]})]})]}),f.jsx(Oo,{title:"ドラッグで一覧と図の幅を変える(ダブルクリックで元に戻す)",start:()=>{var X;return((X=O.current)==null?void 0:X.getBoundingClientRect().width)??A.side},onDrag:(X,pe)=>R(W=>ws({...W,side:X+pe},C,!!ee)),onEnd:()=>R(X=>(xs(X),X)),onReset:()=>R(X=>(xs({...X,side:fi.side}),{...X,side:fi.side}))}),f.jsxs("main",{className:"canvas",children:[f.jsxs("div",{className:"toolbar",children:[f.jsxs("div",{className:"ds-seg",children:[f.jsx("button",{className:c==="changes"?"on":"",onClick:()=>d("changes"),title:"変更したテーブルと、その外部キーの参照先だけ",children:"変更まわり"}),f.jsx("button",{className:c==="all"?"on":"",onClick:()=>d("all"),title:"すべてのテーブル",children:"全体"})]}),f.jsx("button",{className:"ds-btn",onClick:()=>{var X;return(X=k.current)==null?void 0:X.fit()},title:"図全体を画面に収める",children:"全体を表示"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var X;return(X=k.current)==null?void 0:X.zoom(1.25)},"aria-label":"拡大",children:"+"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var X;return(X=k.current)==null?void 0:X.zoom(.8)},"aria-label":"縮小",children:"−"}),f.jsx("span",{className:"muted hint",title:"スクロールでも移動できます。トラックパッドのピンチでも拡大縮小できます",children:"ドラッグで移動・⌘ / Ctrl + スクロールで拡大・クリックで詳細"})]}),e.warnings.length>0&&f.jsx("div",{className:"warnings",children:e.warnings.map((X,pe)=>f.jsx("div",{className:"warning",children:X},pe))}),ot&&c==="changes"?f.jsxs("div",{className:"empty",children:["スキーマの変更はありません(",e.target.files.length," ファイルを比較しました)"]}):f.jsx(b1,{ref:k,tables:e.er,mode:c,values:j,selected:(ee==null?void 0:ee.kind)==="table"?ee.name:null,reviewed:H,comments:P,onSelect:X=>X?K(X,!1):p(null),found:J})]}),ee&&f.jsx(Oo,{title:"ドラッグで図と詳細パネルの幅を変える(ダブルクリックで元に戻す)",start:()=>ws(A,C,!0).panel,onDrag:(X,pe)=>R(W=>ws({...W,panel:X-pe},C,!0)),onEnd:()=>R(X=>(xs(X),X)),onReset:()=>R(X=>(xs({...X,panel:fi.panel}),{...X,panel:fi.panel}))}),ee&&f.jsx(Fb,{selection:ee,change:he,erTable:ge,values:xe,type:Oe,reviewed:he?Q(he):!1,onReviewed:X=>he&&F(he,X),known:b,onJump:X=>K(X),onClose:()=>p(null)})]})]})})}function R1({data:e,active:t,onComments:n,ai:r,onAi:i}){const o=e.databases,s=o.length>1,l=`dbshape.database:${e.repoRoot}`,[a,u]=T.useState(()=>{var N;const _=Yt(l,null);return _&&o.some(D=>D.database.id===_)?_:(N=[...o].sort((D,E)=>Bs(E)-Bs(D))[0])==null?void 0:N.database.id}),c=o.find(_=>_.database.id===a)??o[0],d=_=>{u(_),_t(l,_)},[h,p]=T.useState({}),y=T.useRef(new Map),x=_=>{let N=y.current.get(_);return N||y.current.set(_,N=D=>p(E=>({...E,[_]:D}))),N};T.useEffect(()=>{const _=o.filter(N=>{var D;return(((D=h[N.database.id])==null?void 0:D.open)??0)>0});n({open:_.reduce((N,D)=>N+h[D.database.id].open,0),prompt:()=>{const N=_.map(D=>h[D.database.id].prompt().trimEnd()).filter(Boolean);return N.length?`${N.join(`
|
|
79
|
+
=====
|
|
80
|
+
`)}
|
|
81
|
+
`:""},review:()=>{const N=o.map(D=>{var E,O;return{d:D,text:((O=(E=h[D.database.id])==null?void 0:E.review)==null?void 0:O.call(E))??""}}).filter(D=>D.text);return N.length===0?"":[...N.map(({d:D,text:E})=>s?`### DB: ${D.database.name}
|
|
82
|
+
|
|
83
|
+
${E}`:E),$1].join(`
|
|
84
|
+
|
|
85
|
+
`)}})},[o,h,s,n]);const S=_=>s?`${_+1}/`:"",[v,m]=T.useState({}),g=T.useRef(new Map),w=_=>{let N=g.current.get(_);return N||g.current.set(_,N=D=>m(E=>({...E,[_]:D}))),N},$=T.useRef(0);if(T.useEffect(()=>{if(!r||$.current===r.seq||!o.every(N=>{var D;return((D=v[N.database.id])==null?void 0:D.seq)===r.seq}))return;$.current=r.seq;const _=o.reduce((N,D)=>N+v[D.database.id].placed,0);i({seq:r.seq,placed:_,dropped:r.items.filter(N=>N.module==="db").length-_})},[r,o,v,i]),!c)return f.jsx("div",{className:"fatal muted",children:"スキーマの SQL ファイルがありません"});const k=s?f.jsx("div",{className:"db-switch",role:"tablist","aria-label":"データベース",children:o.map(_=>{const N=Bs(_),D=_===c;return f.jsxs("button",{role:"tab","aria-selected":D,className:`db-tab ${D?"on":""} ${N===0?"quiet":""}`,onClick:()=>d(_.database.id),title:`${ef(_.schemaFrom)}
|
|
86
|
+
変更 ${N}`,children:[f.jsx("span",{className:"db-name",children:_.database.name}),f.jsx("span",{className:"db-count",children:N})]},_.database.id)})}):void 0;return f.jsx(f.Fragment,{children:o.map((_,N)=>f.jsx("div",{className:"db-pane",hidden:_!==c,children:f.jsx(A1,{data:_,active:t&&_===c,onComments:x(_.database.id),ai:r,aiPrefix:S(N),onAi:w(_.database.id),switcher:k})},_.database.id))})}const O1={id:"db",title:"DB",heading:"DB スキーマ",description:"DB スキーマ(dbshape): テーブル・カラム・制約・CHECK の値の変化",icon:J0,View:R1,badge:e=>e.databases.reduce((t,n)=>t+Bs(n),0)||void 0,clearReview:e=>{$b(e),xb(e)}};function M1(e){const t=new Map,n=new Map;for(const l of e.files){n.set(l.path,l);const a=t.get(l.dir)??[];a.push(l),t.set(l.dir,a)}const r=new Map,i=new Map;for(const l of e.edges)gh(r,l.from,l),gh(i,l.to,l);const o=[...t.keys()].sort(),s=new Set;for(const l of e.files)l.status!=="unchanged"&&s.add(l.dir);return{graph:e,filesByDir:t,edgesByFrom:r,edgesByTo:i,fileByPath:n,dirs:o,changedDirs:[...s].sort()}}function gh(e,t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])}function vl(e,t){return e===0&&t>0?"added":t===0&&e>0?"removed":"unchanged"}function Iv(e,t){let n;for(const r of e)(r.dir===""||t===r.dir||t.startsWith(r.dir+"/"))&&(!n||r.dir.length>n.dir.length)&&(n=r);return n}function Av(e,t,n){const r=Iv(e,t);if(!r||r.dir==="")return t||"(root)";const i=t===r.dir?".":t.slice(r.dir.length+1);return`${r.dir.split("/").pop()}:${i}`}function Ue(e){const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function vt(e){return e.slice(e.lastIndexOf("/")+1)}function P1(e){const t=new Map,n=r=>{let i=t.get(r);return i||(i={path:r,name:r===""?"(root)":vt(r),dirs:[],files:[],stats:{added:0,modified:0,removed:0,total:0}},t.set(r,i),r!==""&&n(Ue(r)).dirs.push(i),i)};n("");for(const r of e.graph.files){n(r.dir).files.push(r);let i=r.dir;for(;i!==null;){const o=n(i);o.stats.total++,r.status!=="unchanged"&&o.stats[r.status]++,i=i===""?null:Ue(i)}}for(const r of t.values())r.dirs.sort((i,o)=>i.name.localeCompare(o.name)),r.files.sort((i,o)=>i.path.localeCompare(o.path));return{root:n(""),byPath:t}}function Rv(e){const t=[];let n=e;for(;n!=="";)n=Ue(n),n!==""&&t.unshift(n);return t}function xl(e){return e.added+e.modified+e.removed===0?"unchanged":e.added===e.total?"added":e.removed===e.total?"removed":"modified"}const F1=e=>`t:${e}`;function Ua(e){if(e.length===0)return"";const t=e.map(r=>Ue(r)?Ue(r).split("/"):[]),n=[];for(let r=0;;r++){const i=t[0][r];if(i===void 0||t.some(o=>o[r]!==i))break;n.push(i)}return n.join("/")}function Ov(e){return[...e.files,...e.dirs.flatMap(Ov)]}function Ir(e,t,n,r){const i=n.slice(2);if(n.startsWith("f:")){const o=e.fileByPath.get(i);return o?{id:n,kind:"file",label:`${vt(o.dir)}/${vt(o.path)}`,path:i,status:o.status,files:[o],pinned:r,depth:0}:null}if(n.startsWith("d:")){const o=t.get(i);return o?{id:n,kind:"dir",label:`${o.name}/`,path:i,status:xl(o.stats),files:Ov(o),pinned:r,scope:i,depth:0}:null}if(n.startsWith("r:")){const o=t.get(i);if(!o)return null;const s=o.files.filter(l=>l.status==="unchanged");return{id:n,kind:"rest",label:`${o.name}/`,suffix:` のほか ${s.length} ファイル`,path:i,status:"unchanged",files:s,pinned:r,depth:0}}if(n.startsWith("c:")){const o=t.get(i);return o?{id:n,kind:"container",label:`${o.name}/`,path:i,status:"unchanged",files:o.files,pinned:r,depth:0}:null}if(n.startsWith("p:")){const o=t.get(i);if(!o)return null;const s={added:0,modified:0,removed:0,total:o.files.length};for(const l of o.files)l.status!=="unchanged"&&s[l.status]++;return{id:n,kind:"package",label:o.name,suffix:"(パッケージ)",path:i,status:xl(s),files:o.files,pinned:r,depth:0}}return null}const yn=(e,t)=>t===""||e===t||e.startsWith(t+"/");function sf(e,t,n){const r=[];for(const i of t.files)for(const o of e.edgesByFrom.get(i.path)??[])o.external&&!n||t.scope!==void 0&&!o.external&&yn(o.to,t.scope)||r.push(o);return r}const wl=(e,t)=>({from:e,to:t,before:0,after:0,added:0,removed:0,status:"unchanged"});function yh(e,t){t!=="added"&&e.before++,t!=="removed"&&e.after++,t==="added"&&e.added++,t==="removed"&&e.removed++}function Mv(e,t){if(!t)return;const n=new Map((e.files??[]).map(r=>[r.path,r]));for(const r of t){const i=n.get(r.path);i?(i.status!==r.status&&(i.status="unchanged"),r.typeOnly||delete i.typeOnly):n.set(r.path,{...r})}e.files=[...n.values()].sort((r,i)=>r.path.localeCompare(i.path))}function kl(e,t,n){const r=new Map;for(const i of sf(e,t,n)){const o=i.external?`x:${i.to}`:`d:${i.to}`;let s=r.get(o);s||(s={target:{id:o,dir:i.to,label:i.external?i.to:Av(e.graph.modules,i.to),external:i.external},link:wl(t.id,o),fileLinks:new Map},r.set(o,s));const l=s.link;yh(l,i.status),i.typeOnly!==void 0&&(l.typeOnly=(l.typeOnly??!0)&&i.typeOnly);for(const a of i.files??[]){const u=F1(a.path);let c=s.fileLinks.get(u);c||s.fileLinks.set(u,c=wl(t.id,u)),yh(c,a.status),c.typeOnly=(c.typeOnly??!0)&&!!a.typeOnly}Mv(l,i.files)}for(const{link:i,fileLinks:o}of r.values()){i.status=vl(i.before,i.after);for(const s of o.values())s.status=vl(s.before,s.after),s.typeOnly||delete s.typeOnly}return r}function Pv(e,t,n,r=`g:${n}`){const i=wl(t.id,r),o=new Map;let s=!0;for(const l of sf(e,t,!1)){if(l.external||!yn(l.to,n))continue;const a=o.get(l.from)??{before:!1,after:!1};l.status!=="added"&&(a.before=!0),l.status!=="removed"&&(a.after=!0),o.set(l.from,a),s&&(s=l.typeOnly===!0),Mv(i,l.files)}if(o.size===0)return null;for(const l of o.values())l.before&&i.before++,l.after&&i.after++,!l.before&&l.after&&i.added++,l.before&&!l.after&&i.removed++;return i.status=vl(i.before,i.after),s&&(i.typeOnly=!0),i}function D1(e,t,n,r){const i=s=>{const l=Ir(e,t,s,n.pinned);return l?(l.scope=n.scope??l.scope,l.kind==="file"&&(l.label=vt(l.path)),l):null};let o=[];if(n.kind==="dir"){const s=t.get(n.path);if(!s)return[];o=[...s.dirs.map(l=>i(`d:${l.path}`)),...s.files.map(l=>i(`f:${l.path}`))]}else(n.kind==="rest"||n.kind==="package")&&(o=n.files.map(s=>i(`f:${s.path}`)));return o.filter(s=>s!==null&&sf(e,s,r).length>0)}function eo(e,t){const n=new Set(t.files.map(o=>o.path)),r=new Set(t.files.map(o=>o.dir)),i=new Map;for(const o of e.graph.edges){if(o.external||n.has(o.from)||t.scope!==void 0&&yn(Ue(o.from),t.scope))continue;let s;if(o.files){const a=o.files.filter(u=>n.has(u.path));if(!a.length)continue;s={before:a.some(u=>u.status!=="added"),after:a.some(u=>u.status!=="removed"),typeOnly:a.every(u=>!!u.typeOnly)}}else{if(!r.has(o.to))continue;s={before:o.status!=="added",after:o.status!=="removed",typeOnly:!1}}const l=i.get(o.from);l?(l.before||(l.before=s.before),l.after||(l.after=s.after),l.typeOnly&&(l.typeOnly=s.typeOnly)):i.set(o.from,s)}return i}function Fv(e,t,n){if(!n.length)return null;const r=wl(e,t);for(const i of n)i.before&&r.before++,i.after&&r.after++,!i.before&&i.after&&r.added++,i.before&&!i.after&&r.removed++;return r.status=vl(r.before,r.after),n.every(i=>i.typeOnly)&&(r.typeOnly=!0),r}function mc(e){const t=e.slice(4);return e.startsWith("i:f:")?n=>n===t:e.startsWith("i:d:")?n=>Ue(n)===t:n=>yn(Ue(n),t)}function z1(e,t,n,r){var s,l;if(n.startsWith("i:")){const a=Ir(e,t,r,!1);if(!a)return null;const u=a.kind==="container"?{...a,files:a.files.filter(d=>d.path.endsWith(".go"))}:a,c=mc(n);return Fv(n,r,[...eo(e,u)].filter(([d])=>c(d)).map(([,d])=>d))}const i=Ir(e,t,n,!1);if(!i)return null;if(r.startsWith("g:"))return Pv(e,i,r.slice(2),r);const o=kl(e,i,!0);return r.startsWith("t:")?((l=o.get(`d:${Ue(r.slice(2))}`))==null?void 0:l.fileLinks.get(r))??null:((s=o.get(r))==null?void 0:s.link)??null}function vh(e,t){const n={dir:t,target:!1,children:new Map},r=e.includes(t);for(const s of e){if(s===t)continue;let l=n;for(const a of(t?s.slice(t.length+1):s).split("/")){const u=l.dir?`${l.dir}/${a}`:a;let c=l.children.get(a);c||l.children.set(a,c={dir:u,target:!1,children:new Map}),l=c}l.target=!0}const i=(s,l)=>{const a=[...s.children.values()];if(!s.target&&a.length===1)return i(a[0],`${l}/${vt(a[0].dir)}`);if(a.length===0)return[{kind:"dir",dir:s.dir,label:l,self:!1}];const u=a.flatMap(c=>i(c,vt(c.dir)));return s.target&&u.push({kind:"dir",dir:s.dir,label:`${vt(s.dir)}(パッケージ)`,self:!0}),[{kind:"group",dir:s.dir,label:l,children:u}]},o=[...n.children.values()].flatMap(s=>i(s,vt(s.dir)));return r&&o.push({kind:"dir",dir:t,label:t?`${vt(t)}(パッケージ)`:"(ルート)",self:!0}),o}function B1(e,t,n,r,i,o=new Map,s=new Map){var ce;const l=[],a=new Set,u=(M,J,ee)=>{if(a.has(M.id))return;a.add(M.id);const he=M.kind==="file"?[]:D1(e,t,M,i);if(Object.assign(M,{depth:J,parent:ee,canOpen:he.length>0,open:he.length>0&&(s.get(M.id)??!1)}),l.push(M),M.open)for(const ge of he)u(ge,J+1,M.id)},c=n.map(M=>Ir(e,t,M,!0)).filter(M=>M!==null);for(const M of c)M.isPin=!0;const d=new Map,h=new Map;for(const M of c)M.kind==="file"&&d.set(Ue(M.path),[...d.get(Ue(M.path))??[],M]);const p=[...c.filter(M=>M.kind!=="file").map(M=>({key:`${M.path}/`,box:!1,s:M,dir:M.path})),...[...d.keys()].map(M=>({key:M?`${M}/`:"",box:!0,s:null,dir:M}))].sort((M,J)=>M.key.localeCompare(J.key)||Number(M.box)-Number(J.box));for(const M of p){if(!M.box){u(M.s,0,void 0);continue}const J=d.get(M.dir).filter(xe=>!a.has(xe.id)).sort((xe,Oe)=>xe.path.localeCompare(Oe.path)),ee=J.length?Ir(e,t,`c:${M.dir}`,!0):null;if(!ee)continue;const he=ee.files;ee.files=J.flatMap(xe=>xe.files);const ge={added:0,modified:0,removed:0,total:ee.files.length};for(const xe of ee.files)xe.status!=="unchanged"&&ge[xe.status]++;if(ee.status=xl(ge),a.add(ee.id),ee.depth=0,ee.canOpen=!0,ee.open=s.get(ee.id)??!0,ee.open||(ee.suffix=` ${J.length} ファイル`),l.push(ee),h.set(ee.id,{files:J,pkg:he}),ee.open)for(const xe of J)xe.label=vt(xe.path),u(xe,1,ee.id)}if(r&&!n.includes(r)){const M=Ir(e,t,r,!1);M&&u(M,0,void 0)}const y=l.filter(M=>M.depth===0),x=Ua(y.map(M=>M.path));for(const M of y){const J=x?M.path.slice(x.length+1):M.path;M.label=M.kind==="dir"||M.kind==="rest"||M.kind==="container"?`${J}/`:J}const S=l.map(M=>M.open?new Map:kl(e,M,i)),v=new Set,m=new Map;for(const M of S)for(const{target:J}of M.values())J.external?m.set(J.id,J):v.add(J.dir);const g=Ua([...v]),w=M=>g?M.slice(g.length+1):M,$=M=>{let J=0,ee=0;return S.forEach((he,ge)=>{for(const xe of he.keys())M(xe)&&(J+=ge,ee++)}),ee?J/ee:0},k=M=>$(J=>J.startsWith("d:")&&(M.kind==="group"?yn(J.slice(2),M.dir):J.slice(2)===M.dir)),_=M=>[...M].sort((J,ee)=>{const he=J.kind==="dir"&&J.self?1:0,ge=ee.kind==="dir"&&ee.self?1:0;return he-ge||k(J)-k(ee)||J.label.localeCompare(ee.label)}),N=[],D=[],E=M=>{const J=S.flatMap(ee=>{var he;return[...((he=ee.get(M))==null?void 0:he.fileLinks.values())??[]]});return{fileLinks:J,files:[...new Set(J.map(ee=>ee.to))]}},O=(M,J,ee)=>{var pe;if(M.kind==="group"){const W=`g:${M.dir}`,ne=o.get(W)??!0,me=[...v].filter(Ae=>Ae!==M.dir&&yn(Ae,M.dir)).length,ve=v.has(M.dir)?E(`d:${M.dir}`).files.length:0,Qe=v.has(M.dir)&&ve===0;if(N.push({id:W,kind:"group",dir:M.dir,label:M.label,fullLabel:w(M.dir),external:!1,depth:J,parent:ee,canOpen:!0,open:ne,folderCount:me+(Qe?1:0),directFileCount:ve}),ne)for(const Ae of _(M.children))O(Ae,J+1,W);else for(const Ae of l){if(Ae.open)continue;const Ke=Pv(e,Ae,M.dir,W);Ke&&D.push(Ke)}return}const he=`d:${M.dir}`,{fileLinks:ge,files:xe}=E(he),Oe=W=>$(ne=>ne===he&&S.some(me=>{var ve;return(ve=me.get(ne))==null?void 0:ve.fileLinks.has(W)})),ot=(W,ne)=>{xe.sort((me,ve)=>Oe(me)-Oe(ve)||me.localeCompare(ve));for(const me of xe){const ve=me.slice(2);N.push({id:me,kind:"file",dir:M.dir,label:vt(ve),fullLabel:w(ve),external:!1,depth:W,parent:ne,file:ve})}D.push(...ge)};if(M.self&&xe.length>0){ot(J,ee);return}const X=xe.length>0&&(o.get(he)??!1);if(N.push({id:he,kind:"dir",dir:M.dir,label:M.label,fullLabel:M.self?`${w(M.dir)}(パッケージ)`:w(M.dir),external:!1,depth:J,parent:ee,self:M.self,canOpen:xe.length>0,open:X,fileCount:xe.length}),!X){for(const W of S){const ne=(pe=W.get(he))==null?void 0:pe.link;ne&&D.push(ne)}return}ot(J+1,he)};for(const M of _(vh([...v],g)))O(M,0,void 0);const C=[...m.values()].sort((M,J)=>$(ee=>ee===M.id)-$(ee=>ee===J.id)||M.label.localeCompare(J.label));for(const M of C){N.push({id:M.id,kind:"external",dir:M.dir,label:M.label,fullLabel:M.label,external:!0,depth:0});for(const J of S){const ee=(ce=J.get(M.id))==null?void 0:ce.link;ee&&D.push(ee)}}const A=(M,J)=>{var ee;return J.startsWith("t:")?!!((ee=M.get(`d:${Ue(J.slice(2))}`))!=null&&ee.fileLinks.has(J)):J.startsWith("g:")?[...M.keys()].some(he=>he.startsWith("d:")&&yn(he.slice(2),J.slice(2))):M.has(J)},R=new Map,q=M=>{let J=R.get(M.id);return J||R.set(M.id,J=kl(e,M,i)),J};for(const M of D){const J=h.get(M.from);J&&(M.keys=J.files.filter(ee=>A(q(ee),M.to)).map(ee=>`L:${ee.id}>${M.to}`))}const B=M=>M.endsWith(".go"),V=M=>{var J;return M.kind==="file"&&!!((J=M.parent)!=null&&J.startsWith("c:"))&&B(M.path)},z=new Map,U=M=>{let J=z.get(M.id);if(J)return J;const ee=h.get(M.id),he=ee.pkg.filter(ge=>B(ge.path));return J=ee.files.some(ge=>B(ge.path))&&he.length?eo(e,{...M,files:he}):new Map,z.set(M.id,J),J},b=M=>h.get(M.id).files.filter(J=>!B(J.path)),Q=l.map(M=>{if(V(M))return new Map;if(M.kind==="container"){const J=U(M);if(M.open)return J;const ee=eo(e,{...M,files:b(M).flatMap(he=>he.files)});for(const[he,ge]of J){const xe=ee.get(he);xe?(xe.before||(xe.before=ge.before),xe.after||(xe.after=ge.after),xe.typeOnly&&(xe.typeOnly=ge.typeOnly)):ee.set(he,{...ge})}return ee}return M.open?new Map:eo(e,M)}),H=new Map,j=(M,J)=>{if(J.kind!=="container"||J.open)return;const ee=mc(M),he=`L:${M}>${J.id}`,ge=[...U(J).keys()].some(ee)?[he]:[];for(const xe of b(J)){let Oe=H.get(xe.id);Oe||H.set(xe.id,Oe=eo(e,xe)),[...Oe.keys()].some(ee)&&ge.push(`L:${M}>${xe.id}`)}return ge.length===1&&ge[0]===he?void 0:ge},P=new Set(Q.flatMap(M=>[...M.keys()])),L=new Set([...P].map(Ue)),F=Ua([...L]),K=M=>F?M.slice(F.length+1):M,Z=M=>{let J=0,ee=0;return Q.forEach((he,ge)=>{for(const xe of he.keys())M(xe)&&(J+=ge,ee++)}),ee?J/ee:0},te=M=>{const J=mc(M);l.forEach((ee,he)=>{const ge=Fv(M,ee.id,[...Q[he]].filter(([Oe])=>J(Oe)).map(([,Oe])=>Oe));if(!ge)return;const xe=j(M,ee);xe&&(ge.keys=xe),de.push(ge)})},ie=[],de=[],_e=(M,J,ee)=>{const he=[...P].filter(ge=>Ue(ge)===M);he.sort((ge,xe)=>Z(Oe=>Oe===ge)-Z(Oe=>Oe===xe)||ge.localeCompare(xe));for(const ge of he){const xe=`i:f:${ge}`;ie.push({id:xe,kind:"file",dir:M,label:vt(ge),fullLabel:K(ge),external:!1,depth:J,parent:ee,file:ge}),te(xe)}},fe=(M,J,ee)=>{if(M.kind==="group"){const Oe=`i:g:${M.dir}`,ot=o.get(Oe)??!0;if(ie.push({id:Oe,kind:"group",dir:M.dir,label:M.label,fullLabel:K(M.dir),external:!1,depth:J,parent:ee,canOpen:!0,open:ot,folderCount:[...L].filter(X=>X!==M.dir&&yn(X,M.dir)).length,directFileCount:[...P].filter(X=>Ue(X)===M.dir).length}),!ot)te(Oe);else for(const X of[...M.children].sort((pe,W)=>Number(pe.kind==="dir"&&pe.self)-Number(W.kind==="dir"&&W.self)||Z(ne=>pe.kind==="group"?yn(Ue(ne),pe.dir):Ue(ne)===pe.dir)-Z(ne=>W.kind==="group"?yn(Ue(ne),W.dir):Ue(ne)===W.dir)||pe.label.localeCompare(W.label)))fe(X,J+1,Oe);return}if(M.self)return _e(M.dir,J,ee);const he=`i:d:${M.dir}`,ge=[...P].filter(Oe=>Ue(Oe)===M.dir).length,xe=o.get(he)??!1;ie.push({id:he,kind:"dir",dir:M.dir,label:M.label,fullLabel:K(M.dir),external:!1,depth:J,parent:ee,canOpen:!0,open:xe,fileCount:ge}),xe?_e(M.dir,J+1,he):te(he)},ye=vh([...L],F),Te=M=>Z(J=>M.kind==="group"?yn(Ue(J),M.dir):Ue(J)===M.dir);for(const M of[...ye].sort((J,ee)=>Te(J)-Te(ee)||J.label.localeCompare(ee.label)))fe(M,0,void 0);return{sources:l,targets:N,links:D,targetPrefix:g,sourcePrefix:x,dependents:ie,inLinks:de,dependentPrefix:F}}const lf=e=>e===""?"root":`d:${e}`,af=e=>`f:${e}`,dr=e=>e==="root"?"":e.slice(2);function gc(e,t,n,r){return{id:lf(e.path),kind:t,path:e.path,label:e.name,status:xl(e.stats),dir:e,full:r,children:n}}function Dv(e){return{id:af(e.path),kind:"file",path:e.path,label:vt(e.path),status:e.status,file:e,children:[]}}function U1(e,t){const n=r=>{const i=[];for(const o of r.dirs){const s=t.has(o.path);i.push(gc(o,s?"open":"dir",s?n(o):[],!0))}if(r.path===""||t.has(r.path))for(const o of r.files)i.push(Dv(o));return i};return zv(n(e))}function H1(e,t,n=new Set){const r=Bv(e,"changes"),i=o=>{const s=[];for(const l of o.dirs)r.has(l.path)&&s.push(n.has(l.path)?{...gc(l,"open",[],!1),collapsed:!0}:W1(gc(l,"open",i(l),!1)));for(const l of o.files)l.status!=="unchanged"&&s.push(Dv(l));return s};return zv(i(t))}function W1(e){if(e.kind!=="open"||e.full||e.collapsed||e.children.length!==1)return e;const t=e.children[0];return t.kind!=="open"?e:{...t,label:`${e.label}/${t.label}`}}function zv(e){const t=new Map,n=new Map,r=(o,s)=>{n.set(o.path,s);for(const l of o.files)t.set(l.path,s);for(const l of o.dirs)r(l,s)},i=o=>{switch(o.kind){case"file":t.set(o.path,o.id);break;case"dir":r(o.dir,o.id);break;case"open":o.collapsed?r(o.dir,o.id):n.set(o.path,o.id);break}o.children.forEach(i)};return e.forEach(i),{roots:e,fileRep:t,pkgRep:n}}function V1(e,t,n,r,i,o=1/0){const s=[];if(!r)return s;const l=i?r:r.toLowerCase(),a=d=>(i?d:d.toLowerCase()).includes(l),u=Bv(e,n),c=(d,h)=>{const p=d.path===""?h:[...h,d.path];for(const y of d.dirs){if(s.length>=o)return;u&&!u.has(y.path)||(a(y.name)&&s.push({kind:"dir",path:y.path,reveal:p}),c(y,p))}for(const y of d.files){if(s.length>=o)return;n==="changes"&&y.status==="unchanged"||a(vt(y.path))&&s.push({kind:"file",path:y.path,reveal:p})}};return c(t,[]),s}function Bv(e,t){if(t==="all")return;const n=new Set([""]);for(const r of e.graph.files)if(r.status!=="unchanged"){n.add(r.dir);for(const i of Rv(r.dir))n.add(i)}return n}function q1(e){const t=new Map,n=r=>{if(r.kind==="file")t.set(af(r.path),{id:r.id,offset:0});else{const i=r.label.split("/"),o=r.path.split("/");let s=0;i.forEach((l,a)=>{t.set(lf(o.slice(0,o.length-i.length+a+1).join("/")),{id:r.id,offset:s}),s+=l.length+1})}r.children.forEach(n)};return e.roots.forEach(n),t}const Uv=(e,t)=>`L:${e}>${t}`,Qr=e=>`I:${e}`;function $i(e){if(e.startsWith("L:")){const t=e.slice(2),n=t.indexOf(">");return{kind:"link",from:t.slice(0,n),to:t.slice(n+1)}}return{kind:"item",id:e.slice(2)}}const uf=z1;function cf(e,t,n){const r=$i(n);if(r.kind==="link"){const i=uf(e,t,r.from,r.to);return!i||i.after===0?"resolved":"open"}if(r.id.startsWith("f:")){const i=e.fileByPath.get(dr(r.id));return!i||i.status==="removed"?"resolved":"open"}return t.has(dr(r.id))?"open":"resolved"}function Fo(e,t,n){const r=n.targets.map(o=>cf(e,t,o)),i=r.filter(o=>o==="resolved").length;return i===0?"open":i===r.length?"resolved":"partial"}function K1(e,t){const n=Iv(e.graph.modules,t);if(!n)return t;const r=n.dir===""?t:t===n.dir?"":t.slice(n.dir.length+1);return r?`${n.path}/${r}`:n.path}const Do=(e,t)=>K1(e,t)||".",Sr=e=>`${e||"."}/`;function Ha(e){if(e.startsWith("i:")){const n=e.slice(4);return e.startsWith("i:f:")?n:e.startsWith("i:d:")?`${Sr(n)}*`:Sr(n)}const t=dr(e);return e.startsWith("f:")?t:e.startsWith("d:")?Sr(t):e.startsWith("p:")||e.startsWith("c:")?`${Sr(t)}*`:`${Sr(t)}*(変更のないファイル)`}function G1(e,t,n){if(t.startsWith("x:")||t.startsWith("t:"))return t.slice(2);const r=t.slice(2);if(t.startsWith("g:"))return`${Do(e,r)}/`;const i=((n==null?void 0:n.files)??[]).filter(o=>o.status!=="removed");return i.length===1?i[0].path:Do(e,r)}function Y1(e,t,n){if(t.startsWith("x:"))return`${t.slice(2)}(外部パッケージ)`;if(t.startsWith("t:"))return t.slice(2);const r=t.slice(2),i=t.startsWith("g:")?`${Do(e,r)}/ 配下`:Do(e,r),o=((n==null?void 0:n.files)??[]).filter(s=>s.status!=="removed").map(s=>r?s.path.slice(r.length+1):s.path);return o.length?t.startsWith("g:")?`${i}(${o.join(", ")})`:`${i}/(${o.join(", ")})`:i}function X1(e,t,n,r=3){const i=Ir(e,t,`r:${n}`,!1);if(!i||i.files.length===0)return null;const o=[...kl(e,i,!1).values()].filter(({link:l})=>l.before>0).sort((l,a)=>a.link.before-l.link.before).slice(0,r);if(o.length===0)return`${Sr(n)} の変更のないファイル ${i.files.length} 個は、このリポジトリ内のパッケージを import していません`;const s=o.map(({target:l,link:a})=>`${Do(e,l.dir)} (${a.before})`).join(", ");return`${Sr(n)} の変更のないファイル ${i.files.length} 個の主な依存先: ${s}`}function Hv(e,t,n,r={}){const i=r.includeResolved?n:n.filter(l=>Fo(e,t,l)!=="resolved"),o=l=>{const a=$i(l);if(a.kind==="item")return Ha(a.id);const u=a.from.startsWith("i:")?Ha(a.to):G1(e,a.to,uf(e,t,a.from,a.to));return`${Ha(a.from)} → ${u}`},s=i.map(l=>zd(l.targets.map(o).join(", "),l.body));return{text:Bd(s),included:i.length,skipped:n.length-i.length}}function yc(e,t){var i;const n=dr(t);if(t.startsWith("f:")){const o=n.slice(0,n.lastIndexOf("/"));return`${vt(o)}/${vt(n)}`}const r=((i=e.get(n))==null?void 0:i.name)??vt(n);return t.startsWith("r:")?`${r}/ のほか`:`${r}/`}function xh(e,t,n){const r=$i(n);if(r.kind==="item")return yc(t,r.id);const i=r.to.startsWith("x:")?r.to.slice(2):Av(e.graph.modules,r.to.slice(2));return`${yc(t,r.from)} → ${i}`}function Q1(e){const t=$i(e.targets[0]??"I:root");return t.kind==="link"?t.from:t.id}const Z1=T.forwardRef(function(t,n){const{model:r,tree:i,comments:o,selection:s,draft:l}=t,[a,u]=T.useState("open"),d=o.map(x=>({c:x,state:Fo(r,i,x)})).filter(x=>a==="all"||x.state!=="resolved"),h=new Map;for(const x of d){const S=Q1(x.c);h.set(S,[...h.get(S)??[],x])}const p=[...h.entries()].sort((x,S)=>dr(x[0]).localeCompare(dr(S[0]))),y=l.editingId!==null||l.body!==""||s.length>0;return f.jsxs("aside",{className:"comment-sidebar",children:[f.jsxs("div",{className:"dep-panel-head",children:[f.jsx("strong",{children:"コメント"}),f.jsxs("select",{value:a,onChange:x=>u(x.target.value),title:"表示するコメント",children:[f.jsx("option",{value:"open",children:"未対応のみ"}),f.jsx("option",{value:"all",children:"すべて"})]}),f.jsx("span",{className:"tspacer"}),f.jsx("button",{className:"icon-btn",onClick:t.onClose,title:"閉じる",children:"×"})]}),f.jsx("div",{className:"comment-sidebar-list",children:d.length===0?f.jsx("div",{className:"dep-panel-empty",children:o.length===0?"まだコメントはありません。パネルの矢印や箱をクリック(⌘ / Shift で複数)するか、ツリーの行の 💬 から書けます。":"未対応のコメントはありません。「すべて」に切り替えると解消済み?のものも見られます。"}):p.map(([x,S])=>f.jsxs("section",{className:"comment-group",children:[f.jsx("div",{className:"comment-group-head",title:dr(x),children:yc(i,x)}),S.map(({c:v,state:m})=>{var g;return f.jsx(Ud,{body:v.body,state:m,ai:v.ai,meta:v.targets.length>1?`${v.targets.length}件`:void 0,lit:(g=t.hoveredKeys)==null?void 0:g.some(w=>v.targets.includes(w)),editing:l.editingId===v.id,onMouseEnter:()=>t.onHoverComment(v.targets),onMouseLeave:()=>t.onHoverComment(null),top:f.jsx("ul",{className:"comment-targets",onClick:()=>t.onShow(v),title:"クリックで図に表示",children:v.targets.map(w=>f.jsx("li",{className:cf(r,i,w)==="resolved"?"resolved":"",children:xh(r,i,w)},w))}),onCopy:()=>Ai(Hv(r,i,[v],{includeResolved:!0}).text),onEdit:()=>t.onEdit(v),onDelete:()=>t.onDelete(v.id)},v.id)})]},x))}),f.jsx(Hd,{ref:n,className:"comment-composer",editing:l.editingId!==null,value:l.body,placeholder:"指摘を書く(例: usecase を経由する形にしてください)",onChange:x=>t.onDraft({...l,body:x}),onSave:t.onSave,onCancel:t.onCancel,canSave:s.length>0,showCancel:y,top:f.jsxs("div",{className:"composer-targets",children:[f.jsx("span",{className:"muted",children:l.editingId?"編集中のコメント先:":"コメント先:"}),s.length===0?f.jsx("span",{className:"muted",children:"矢印や箱・行を選ぶとここに入ります(⌘ / Shift で複数)"}):s.map(x=>f.jsxs("span",{className:`chip${x.startsWith("L:")?" link":""}`,title:x,children:[xh(r,i,x),f.jsx("button",{onClick:()=>t.onRemoveTarget(x),title:"外す",children:"×"})]},x))]})})]})});function J1(e,t,n){if(n(e)<=t)return e;const r=[...e];let i=r.length;for(;i>0&&n(r.slice(0,i).join("")+"…")>t;)i--;return r.slice(0,i).join("")+"…"}function eE(e,t,n){const r=e.endsWith("/"),i=(r?e.slice(0,-1):e).split("/"),o=i.pop()+(r?"/":""),s=i.length,l=[];s&&l.push(i.join("/")+"/");for(let a=s-2;a>=1;a--)l.push(`${i[0]}/…/${i.slice(s-a).join("/")}/`);s>=2&&l.push(`…/${i[s-1]}/`,`${i[0]}/…/`),s&&l.push("…/");for(const a of l)if(n(a)+n(o)<=t)return{dir:a,name:o};return{dir:s?"…/":"",name:J1(o,t-(s?n("…/"):0),n)}}function Wv(e,t){const n=t.startsWith("i:")?t.slice(2):t,r=n.slice(2);switch(n[0]){case"f":case"t":return{what:"file",path:r};case"g":return{what:"tree",path:r};case"d":return{what:e==="S"?"tree":"dir",path:r};case"x":return{what:"ext",path:r};default:return{what:"dir",path:r}}}const tE=(e,t)=>{const n=Wv(e,t);return`${e}|${n.what}|${n.path}`},nE=(e,t)=>t===""||e===t||e.startsWith(`${t}/`);function Vv(e,t,n){const[r,i,...o]=e.split("|");if(r!==t)return!1;const s=o.join("|"),l=Wv(t,n);switch(i){case"tree":return l.what!=="ext"&&nE(l.path,s);case"dir":return l.what==="dir"&&l.path===s||l.what==="file"&&Ue(l.path)===s;default:return i===l.what&&s===l.path}}const wh=(e,t,n)=>[...e].some(r=>Vv(r,t,n));function vc(e,t,n){return new Set([...e].filter(r=>!Vv(r,t,n)))}const qv=(e,t)=>cc("depshape",e,t),Kv=(e,t)=>dc("depshape",e,t),rE=7.3,ht=28,Wa=8,Rn=10,iE=18,oE=18,Hs=120,sE=20,lE=16,aE=14,uE="12px ui-monospace, SFMono-Regular, Menlo, monospace";let Yr;function er(e){if(Yr===void 0&&(Yr=document.createElement("canvas").getContext("2d"),Yr&&(Yr.font=uE)),Yr)return Yr.measureText(e).width;let t=0;for(const n of e)t+=/[ -鿿-]/.test(n)?2:1;return t*rE}function kh(e,t){if(er(e)<=t)return e;const n=[...e];let r=0;for(;r<n.length&&er("…"+n.slice(r).join(""))>t;)r++;return"…"+n.slice(r).join("")}const cE=(e,t)=>eE(e,t,er);function bh(e,t,n,r,i){const o=1-e;return o*o*o*t+3*o*o*e*n+3*o*e*e*r+e*e*e*i}function Eh(e){const t=Math.max(e.before,e.after,1);return 1.6+Math.min(3.2,Math.log2(t)*.8)+(e.status==="unchanged"?0:.5)}function Sh(e,t){const n=e.map(()=>0);let r=[...e.keys()],i=t;for(;r.length;){const o=i/r.length,s=r.filter(l=>e[l]<=o);if(!s.length){for(const l of r)n[l]=Math.max(Hs,o);break}for(const l of s)n[l]=e[l],i-=e[l];r=r.filter(l=>!s.includes(l))}return n}const Va=e=>new Map(e.map(t=>[t.id,t.parent])),qa=(e,t,n)=>{for(let r=e.get(t);r;r=e.get(r))if(r===n)return!0;return!1},Ka=e=>e.metaKey||e.ctrlKey||e.shiftKey,Ch=e=>e.detail>1,ks=e=>e.stopPropagation();function dE(e){const{model:t,tree:n,pins:r,hovered:i,targetOpen:o,sourceOpen:s}=e,[l,a]=T.useState(()=>qv("external","0")==="1"),u=T.useMemo(()=>B1(t,n,r,i,l,o,s),[t,n,r,i,l,o,s]),c=T.useMemo(()=>Va(u.sources),[u]),d=T.useMemo(()=>Va(u.targets),[u]),h=T.useMemo(()=>Va(u.dependents),[u]),p=(I,se)=>qa(c,I,se),y=(I,se)=>qa(d,I,se),x=(I,se)=>qa(h,I,se),S=I=>I.depth*lE,v=I=>I.some(se=>se.canOpen)?aE:0,m=v(u.sources),g=v(u.targets),w=v(u.dependents),$=I=>[I.folderCount?`${I.folderCount} フォルダ`:"",I.directFileCount?`${I.directFileCount} ファイル`:""].filter(Boolean).join("・"),k=I=>I.open?"":I.kind==="group"?` ${$(I)}`:I.fileCount?` ${I.fileCount} ファイル`:"",[_,N]=T.useState(null),D=T.useMemo(()=>{const I=(se,ke)=>new Set(e.hidden.size?ke.filter(Ee=>wh(e.hidden,se,Ee.id)).map(Ee=>Ee.id):[]);return{S:I("S",u.sources),T:I("T",u.targets),I:I("I",u.dependents)}},[u,e.hidden]),E=T.useMemo(()=>u.links.filter(I=>!D.S.has(I.from)&&!D.T.has(I.to)),[u,D]),O=T.useMemo(()=>u.inLinks.filter(I=>!D.I.has(I.from)&&!D.S.has(I.to)),[u,D]),[C,A]=T.useState(null);T.useEffect(()=>{if(!C)return;const I=()=>A(null),se=ke=>ke.key==="Escape"&&I();return window.addEventListener("pointerdown",I),window.addEventListener("keydown",se),window.addEventListener("scroll",I,!0),window.addEventListener("blur",I),()=>{window.removeEventListener("pointerdown",I),window.removeEventListener("keydown",se),window.removeEventListener("scroll",I,!0),window.removeEventListener("blur",I)}},[C]);const R=I=>I&&e.openLabel(I)?I:void 0,q=(I,se,ke)=>Ee=>{Ee.preventDefault(),Ee.stopPropagation(),A({x:Ee.clientX,y:Ee.clientY,col:I,id:se,file:ke,openAs:ke&&e.openLabel(ke)})},B=I=>{const se=I&&e.openLabel(I);return{dbl:se?`
|
|
87
|
+
ダブルクリックで${se==="差分を開く"?"このファイルの差分":"このファイル"}を開く`:"",menu:se?`「${se}」、`:""}},V=I=>E.filter(se=>se.from===I||p(se.from,I)),z=I=>new Set(u.links.filter(se=>se.from===I.id||p(se.from,I.id)).map(se=>se.to)).size,U=I=>E.filter(se=>se.to===I||y(se.to,I)),b=I=>O.filter(se=>se.from===I||x(se.from,I)),Q=I=>I.keys??[Uv(I.from,I.to)],H=I=>[...new Set(I.flatMap(Q))],j=T.useRef(null),[P,L]=T.useState(600);T.useEffect(()=>{const I=j.current;if(!I)return;const se=new ResizeObserver(()=>L(I.clientWidth));return se.observe(I),L(I.clientWidth),()=>se.disconnect()},[u.sources.length>0]),T.useEffect(()=>{var I,se;i&&((se=(I=j.current)==null?void 0:I.querySelector(`[data-src="${CSS.escape(i)}"]`))==null||se.scrollIntoView({block:"nearest"}))},[i,u]);const F=u.dependents.length>0,K=F?3:2,Z=Math.round(Math.min(110,Math.max(44,P*.26/K))),te=44,ie=24+sE,de=I=>I.label+(I.suffix??"")+(z(I)===0&&!I.open?" 依存なし":""),_e=(I,se)=>Math.max(Hs,...I.map(ke=>ie+S(ke)+se+er(ke.label+k(ke)))),fe=Math.max(Hs,...u.sources.map(I=>te+S(I)+m+er(de(I)))),ye=_e(u.targets,g),Te=F?_e(u.dependents,w):0,ce=Math.max(Hs*K,P-Rn*2-Z*(K-1)-4),[M,J,ee]=F?Sh([Te,fe,ye],ce):[0,...Sh([fe,ye],ce)],he=Rn,ge=F?he+M+Z:Rn,xe=ge+J+Z,Oe=xe+ee+Rn,ot=I=>I?I*(ht+Wa)-Wa:0,pe=Rn+(F?oE:0),W=pe+(u.targetPrefix||u.sourcePrefix||u.dependentPrefix?iE:0),ne=Math.max(ot(u.sources.length),ot(u.targets.length),ot(u.dependents.length)),me=I=>{const se=W+(ne-ot(I.length))/2;return new Map(I.map((ke,Ee)=>[ke.id,se+Ee*(ht+Wa)]))},ve=me(u.sources),Qe=me(u.targets),Ae=me(u.dependents),Ke=W+ne+Rn,ft=(I,se)=>_===null?!1:se?I.from===_||x(I.from,_)||I.to===_||p(I.to,_):I.from===_||p(I.from,_)||I.to===_||y(I.to,_),Ot=[...E,...O].some(I=>Q(I).some(se=>e.selection.has(se))),Zt={unchanged:0,removed:1,added:2},Ht=I=>[...I].sort((se,ke)=>Zt[se.status]-Zt[ke.status]),Tt=I=>I?`${t.graph.repoRoot}/${I}`:t.graph.repoRoot,Y=I=>`${I.label}${I.suffix??""}`,ae=I=>I.kind==="group"?`${I.fullLabel}/ 配下`:I.kind==="dir"&&!I.file&&I.id.startsWith("i:")?`${I.fullLabel}/ 直下`:I.fullLabel,Se=(I,se,ke)=>{if(se)return[I.status==="added"?"今回追加した import":I.status==="removed"?"今回削除した import":"既存の import"];const Ee=[`import しているファイル: 変更前 ${I.before} → 変更後 ${I.after}${ke!==void 0?`(${ke} ファイル中)`:""}`];return(I.added||I.removed)&&Ee.push(`うち 今回追加 ${I.added} / 今回削除 ${I.removed}`),Ee},Ce=(I,se,ke)=>{var G;const Ee=[`${Y(se)} → ${ae(ke)}${I.typeOnly?"(型のみの import)":""}`];if(Ee.push(...Se(I,se.kind==="file",se.files.filter(re=>re.status!=="removed").length)),(G=I.files)!=null&&G.length){const re={added:"+",removed:"−",unchanged:"・"};Ee.push("import しているファイル:");for(const oe of I.files.slice(0,12))Ee.push(` ${re[oe.status]} ${oe.path.slice(ke.dir?ke.dir.length+1:0)}`);I.files.length>12&&Ee.push(` …ほか ${I.files.length-12} 件`)}return Ee.join(`
|
|
88
|
+
`)},je=(I,se,ke)=>[`${ae(se)} → ${Y(ke)}${I.typeOnly?"(型のみの import)":""}`,...Se(I,se.kind==="file")].join(`
|
|
89
|
+
`),Pe=(I,se,ke,Ee,G,re,oe,be)=>{const Ne=Z/2,Re=Q(I),Ie=Re.length>0&&Re.every(St=>e.selection.has(St)),pt=Re.some(St=>{var fn;return(fn=e.litKeys)==null?void 0:fn.has(St)}),Jt=Re.reduce((St,fn)=>St+(e.commentCounts.get(fn)??0),0),Be=ft(I,re),en=`M${se},${ke} C${se+Ne},${ke} ${Ee-Ne},${G} ${Ee},${G}`,dn=St=>[bh(St,se,se+Ne,Ee-Ne,Ee),bh(St,ke,ke,G,G)];return f.jsxs("g",{className:`plink${Be||pt?" active":""}${Ie?" selected":""}`,onClick:St=>e.onSelectKeys(Re,Ka(St)),onMouseEnter:()=>e.onHoverKey(Re),onMouseLeave:()=>e.onHoverKey(null),children:[(Ie||pt)&&f.jsx("path",{d:en,className:pt?"psel lit":"psel",style:{strokeWidth:Eh(I)+7}}),f.jsx("path",{d:en,className:`medge ${I.status}${I.typeOnly?" typeonly":""}${Be||Ie||pt?" active":""}`,style:{strokeWidth:Eh(I)},markerEnd:`url(#parrow-${I.status})`}),f.jsx("path",{d:en,className:"phit",children:f.jsx("title",{children:`${oe}
|
|
90
|
+
クリックで選択(⌘ / Shift で追加)`})}),Jt>0&&f.jsxs("g",{className:"pcomment",children:[f.jsx("circle",{cx:dn(.5)[0],cy:dn(.5)[1],r:7}),f.jsx("text",{x:dn(.5)[0],y:dn(.5)[1]+3.5,textAnchor:"middle",children:Jt})]}),be!==null&&f.jsx("text",{x:dn(be)[0],y:dn(be)[1]-4,textAnchor:"middle",className:"pcount",children:I.before!==I.after?`${I.before}→${I.after}`:I.after})]},`${I.from}>${I.to}`)},nt=(I,se)=>{const{dir:ke,name:Ee}=cE(I,se);return f.jsxs(f.Fragment,{children:[ke&&f.jsx("tspan",{className:"pdir",children:ke}),f.jsx("tspan",{className:"pname",children:Ee})]})},Et=(I,se)=>{var Df;const ke=se==="dependent",Ee=(ke?Ae:Qe).get(I.id),G=ke?he:xe,re=ke?M:ee,oe=ke?w:g,be=G+S(I),Ne=re-S(I),Re=I.file?`f:${I.file}`:I.kind==="group"||ke?`d:${I.dir}`:I.self?`p:${I.dir}`:I.id,Ie=r.includes(Re),pt=ke?b(I.id):U(I.id),Jt=pt.length>0&&pt.every(pn=>pn.status==="added"),Be=I.file?(Df=t.fileByPath.get(I.file))==null?void 0:Df.status:void 0,en=k(I),dn=ke?"import している側の":"import している ",St=I.kind==="group"?$(I):`import している ${I.fileCount} ファイル`,fn=I.canOpen?I.open?`
|
|
91
|
+
▾ でまとめる`:`
|
|
92
|
+
▸ で開いて、${St}を表示`:"",sa=I.external?`${I.dir}(外部パッケージ)`:I.file?`${Tt(I.file)}${Be==="added"?"(今回追加したファイル)":Be==="modified"?"(今回変更したファイル)":""}`:I.kind==="group"?`${Tt(I.dir)}/ 配下(${dn}${$(I)}をまとめた行)`:ke?`${Tt(I.dir)}/ 直下の、import しているファイル`:`${Tt(I.dir)}${I.self?`
|
|
93
|
+
このパッケージ(フォルダ直下のファイル)だけ。下のフォルダは含まない`:""}`,la=ke?"ここから出る依存":"ここに入る依存",Jo=R(I.file),Ff=B(Jo);return f.jsxs("g",{className:`pnode target ${I.kind}${ke?" dependent":""}${(ke?D.I:D.T).has(I.id)?" hid":""}${I.self?" self":""}${I.open?" open":""}${Jt?" new":""}${Ie?" pinned":""}${Be&&Be!=="unchanged"?` f-${Be}`:""}`,onMouseEnter:()=>N(I.id),onMouseLeave:()=>N(null),onClick:pn=>!Ch(pn)&&e.onSelectKeys(H(pt),Ka(pn)),onDoubleClick:Jo?()=>{var pn;return(pn=e.onOpenFile)==null?void 0:pn.call(e,Jo)}:void 0,onContextMenu:q(ke?"I":"T",I.id,Jo),children:[f.jsx("title",{children:`${sa}
|
|
94
|
+
クリックで${la}をすべて選択${fn}${Ff.dbl}
|
|
95
|
+
右クリックで${Ff.menu}線を非表示 / 表示`}),f.jsx("rect",{x:be,y:Ee,width:Ne,height:ht,rx:6}),I.canOpen&&f.jsxs("g",{className:"pchev",onClick:pn=>{pn.stopPropagation(),e.onToggleTarget(I.id,!I.open)},onDoubleClick:ks,children:[f.jsx("title",{children:I.open?"まとめる":`開いて、${St}を表示`}),f.jsx("rect",{x:be,y:Ee,width:10+oe,height:ht}),f.jsx("text",{x:be+8,y:Ee+ht/2+4,children:I.open?"▾":"▸"})]}),f.jsxs("text",{x:be+10+oe,y:Ee+ht/2+4,className:"plabel",children:[I.external?kh(I.label,Ne-ie-oe):nt(I.label,Ne-ie-oe-(en?er(en):0)),en&&f.jsx("tspan",{className:"pnone",children:en})]}),!I.external&&f.jsxs("g",{className:`pbtn${Ie?" on":""}`,onClick:pn=>{pn.stopPropagation(),e.onTogglePin(Re)},onDoubleClick:ks,children:[f.jsx("title",{children:Ie?"ピン留め中(クリックでピン留めを外す)":"ピン留めして、この先の依存をたどる"}),f.jsx("rect",{x:be+Ne-26,y:Ee+4,width:20,height:ht-8,rx:4}),f.jsx(uc,{on:Ie,x:be+Ne-23,y:Ee+ht/2-7})]})]},I.id)},ut=(I,se,ke)=>I&&f.jsxs("text",{x:se,y:pe+10,className:"pcaption",children:[f.jsx("title",{children:Tt(I)}),kh(`${I}/ 以下`,ke)]});return f.jsxs("div",{className:"dep-panel",children:[f.jsxs("div",{className:"dep-panel-head",children:[f.jsx("strong",{children:"依存の可視化"}),f.jsxs("span",{className:"muted",children:[r.length?`ピン留め ${r.length}`:"",i?`${r.length?" + ":""}ホバー中 1`:""]}),f.jsx("span",{className:"tspacer"}),f.jsxs("label",{className:"ds-check",title:"依存先の列に、npm パッケージや Go の標準・外部パッケージも描きます(上の差分の数には含みません)",children:[f.jsx("input",{type:"checkbox",checked:l,onChange:I=>{a(I.target.checked),Kv("external",I.target.checked?"1":"0")}}),"外部パッケージも表示"]}),f.jsx("button",{className:"ds-btn",onClick:e.onClearPins,disabled:r.length===0,children:"ピンをすべて外す"})]}),u.sources.length===0?f.jsxs("div",{className:"dep-panel-empty",children:["左のツリーの行にホバーすると、ここに表示され、右に依存先(使っているもの)、左に依存元(使っている側)が出ます。",f.jsx("br",{}),"ピンのアイコンでピン留めすると表示し続けるので、複数並べて依存の形を比べられます。"]}):f.jsx("div",{className:"dep-panel-scroll",ref:j,children:f.jsxs("svg",{width:Oe,height:Ke,className:`panel-svg${_||e.litKeys?" hovering":""}${Ot?" selecting":""}`,children:[f.jsx("defs",{children:["unchanged","added","removed"].map(I=>f.jsx("marker",{id:`parrow-${I}`,viewBox:"0 0 8 8",refX:"7",refY:"4",markerWidth:"8",markerHeight:"8",markerUnits:"userSpaceOnUse",orient:"auto",children:f.jsx("path",{d:"M0,0 L8,4 L0,8 z",className:`arrowhead ${I}`})},I))}),F&&f.jsxs("g",{className:"ptitle",children:[f.jsx("text",{x:he,y:Rn+10,children:"依存元(使っている側)"}),f.jsx("text",{x:ge,y:Rn+10,children:"ピン留め"}),f.jsx("text",{x:xe,y:Rn+10,children:"依存先(使っているもの)"})]}),ut(u.dependentPrefix,he,M),ut(u.sourcePrefix,ge,J),ut(u.targetPrefix,xe,ee),Ht(O).map(I=>{const se=u.dependents.find(Ee=>Ee.id===I.from),ke=u.sources.find(Ee=>Ee.id===I.to);return Pe(I,he+M,Ae.get(I.from)+ht/2,ge+S(ke)-1,ve.get(I.to)+ht/2,!0,je(I,se,ke),se.kind!=="file"?.2:null)}),Ht(E).map(I=>{const se=u.sources.find(Ee=>Ee.id===I.from),ke=u.targets.find(Ee=>Ee.id===I.to);return Pe(I,ge+J,ve.get(I.from)+ht/2,xe+S(ke)-1,Qe.get(I.to)+ht/2,!1,Ce(I,se,ke),se.kind!=="file"?.8:null)}),u.dependents.map(I=>Et(I,"dependent")),u.sources.map(I=>{const se=ve.get(I.id),ke=z(I),Ee=ge+S(I),G=J-S(I),re=I.kind==="container",oe=ke===0&&!I.open,be=re?`/
|
|
96
|
+
ピン留めした ${I.files.length} ファイルをまとめた箱(Go ではこの箱がパッケージで、依存元の線はここに届きます)`:I.kind==="file"?"":`
|
|
97
|
+
${I.files.length} ファイル`,Ne=H([...V(I.id),...re?O.filter(Be=>Be.to===I.id):[]]),Re=re?"ファイルごと":"中のフォルダ・ファイルごと",Ie=I.canOpen?I.open?`
|
|
98
|
+
▾ でまとめる`:`
|
|
99
|
+
▸ で開いて、${Re}に分ける`:"",pt=I.kind==="file"?R(I.path):void 0,Jt=B(pt);return f.jsxs("g",{"data-src":I.id,className:`pnode source ${I.kind} ${I.status}${D.S.has(I.id)?" hid":""}${I.pinned?" pinned":" temp"}${I.depth?" child":""}${I.open?" open":""}`,onMouseEnter:()=>N(I.id),onMouseLeave:()=>N(null),onClick:Be=>!Ch(Be)&&e.onSelectKeys(Ne,Ka(Be)),onDoubleClick:pt?()=>{var Be;return(Be=e.onOpenFile)==null?void 0:Be.call(e,pt)}:void 0,onContextMenu:q("S",I.id,pt),children:[f.jsx("title",{children:`${Tt(I.path)}${be}
|
|
100
|
+
依存先 ${ke}
|
|
101
|
+
クリックで${re?"この箱に出入りする":"ここから出る"}依存をすべて選択${Ie}${Jt.dbl}
|
|
102
|
+
右クリックで${Jt.menu}線を非表示 / 表示`}),f.jsx("rect",{x:Ee,y:se,width:G,height:ht,rx:6}),I.canOpen&&f.jsxs("g",{className:"pchev",onClick:Be=>{Be.stopPropagation(),e.onToggleSource(I.id,!I.open)},onDoubleClick:ks,children:[f.jsx("title",{children:I.open?"まとめる":`開いて、${Re}に分ける`}),f.jsx("rect",{x:Ee,y:se,width:10+m,height:ht}),f.jsx("text",{x:Ee+8,y:se+ht/2+4,children:I.open?"▾":"▸"})]}),f.jsxs("text",{x:Ee+10+m,y:se+ht/2+4,className:"plabel",children:[nt(I.label,G-te-m-er(I.suffix??"")-(oe?er(" 依存なし"):0)),I.suffix&&f.jsx("tspan",{className:"psuffix",children:I.suffix}),oe&&f.jsx("tspan",{className:"pnone",children:" 依存なし"})]}),I.isPin&&f.jsxs("g",{className:"pbtn",onClick:Be=>{Be.stopPropagation(),e.onTogglePin(I.id)},onDoubleClick:ks,children:[f.jsx("title",{children:"ピン留め中(クリックでピン留めを外す)"}),f.jsx("rect",{x:ge+J-26,y:se+4,width:20,height:ht-8,rx:4}),f.jsx(uc,{on:I.pinned,x:ge+J-23,y:se+ht/2-7})]})]},I.id)}),u.targets.map(I=>Et(I,"target"))]})}),C&&f.jsx("div",{className:"panel-menu",style:{left:C.x,top:C.y},role:"menu",onPointerDown:I=>I.stopPropagation(),children:(()=>{const I=wh(e.hidden,C.col,C.id),se=Ee=>()=>{e.onHiddenChange(Ee),A(null)},ke=C.file;return f.jsxs(f.Fragment,{children:[ke&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{role:"menuitem",onClick:()=>{var Ee;(Ee=e.onOpenFile)==null||Ee.call(e,ke),A(null)},children:[f.jsx(Od,{size:14}),C.openAs]}),f.jsx("div",{className:"panel-menu-sep",role:"separator"})]}),I?f.jsxs("button",{role:"menuitem",onClick:se(vc(e.hidden,C.col,C.id)),children:[f.jsx(Ra,{on:!0}),"表示"]}):f.jsxs("button",{role:"menuitem",onClick:se(new Set([...e.hidden,tE(C.col,C.id)])),children:[f.jsx(Ra,{on:!1}),"非表示"]}),f.jsxs("button",{role:"menuitem",disabled:e.hidden.size===0,onClick:se(new Set),children:[f.jsx(Ra,{on:!0}),"すべて表示"]})]})})()})]})}const bl=340,Nh=220,jh=360,_h=260,Gv="depshape.layout";function fE(){try{const e=JSON.parse(localStorage.getItem(Gv)??"{}");return{tree:typeof e.tree=="number"&&e.tree>0?e.tree:void 0,side:typeof e.side=="number"&&e.side>0?e.side:bl}}catch{return{side:bl}}}function bs(e){try{localStorage.setItem(Gv,JSON.stringify(e))}catch{}}function Es(e,t,n){const r=zr*(n?2:1);let i=e.side;n&&(i=Math.max(_h,Math.min(i,t-r-Nh-jh)));const o=t-r-(n?i:0);return{tree:e.tree===void 0?void 0:Math.max(Nh,Math.min(e.tree,o-jh)),side:Math.max(_h,i)}}function pE(e,t){const n=e.tree===void 0?"minmax(0, 1fr)":`${e.tree}px`,r=e.tree===void 0?"minmax(0, 1.15fr)":"minmax(0, 1fr)";return[n,`${zr}px`,r,...t?[`${zr}px`,`${e.side}px`]:[]].join(" ")}const df="depshape.reviewed:",El=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,$h=e=>Yt(df+e,{}),hE=(e,t)=>_t(df+e,t),mE=e=>Ko(df+e),Yv=e=>`depshape.comments:${e}`;function gE(e,t){const n=new Map;for(const r of e)r.status!=="unchanged"&&n.set(r.path,[]);for(const r of t){if(r.external||r.status==="unchanged")continue;let i=n.get(r.from);i||n.set(r.from,i=[]),i.push(`${r.status==="added"?"+":"-"} ${r.to}`)}return new Map([...n].map(([r,i])=>[r,co(i.sort())]))}function yE(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}function Th(e,t,n){let r=!1;for(const i of t.keys())if(!(e!==""&&!i.startsWith(e+"/"))){if(!n.has(i))return!1;r=!0}return r}const Xv=e=>`import が ${e.added} 増え、${e.removed} 減った`,vE=e=>e.metaKey||e.ctrlKey||e.shiftKey;function xE(e,t){const n=new Map;for(const r of e.graph.edges){if(r.external||r.status==="unchanged")continue;const i=t.fileRep.get(r.from);if(!i)continue;let o=n.get(i);o||n.set(i,o={added:0,removed:0}),o[r.status]++}return n}const Ga=e=>t=>{t.stopPropagation(),e()};function wE(e){const{model:t,root:n,tree:r,open:i,mode:o,pins:s}=e,l=!!e.onOpenFile,[a,u]=T.useState(null),c=T.useRef(void 0),d=T.useRef(null),[h,p]=T.useState(null),y=T.useCallback(Y=>{d.current=Y,p(Y)},[]),x=T.useRef(null),S=T.useRef(null),[v,m]=T.useState(fE),g=ov(S),w=T.useRef(null),$=T.useMemo(()=>[...i].sort().join("|"),[i]),k=T.useMemo(()=>[...e.collapsed].sort().join("|"),[e.collapsed]),_=T.useMemo(()=>o==="all"?U1(n,i):H1(t,n,e.collapsed),[t,n,r,o,$,k]),N=T.useMemo(()=>xE(t,_),[t,_]),D=T.useMemo(()=>{const Y=[];let ae=!1;const Se=Ce=>{for(const je of Ce)je.kind==="open"&&(je.collapsed?ae=!0:(Y.push(je.path),Se(je.children)))};return Se(_.roots),{shown:Y,folded:ae}},[_]),E=o==="all"?D.shown.length>0:!D.folded,O=T.useMemo(()=>new Set(s),[s]),[C,A]=T.useState(()=>new Map),R=(Y,ae)=>A(Se=>new Map(Se).set(Y,ae)),[q,B]=T.useState(()=>new Map),V=(Y,ae)=>B(Se=>new Map(Se).set(Y,ae)),[z,U]=T.useState(()=>new Set),[b,Q]=T.useState([]),[H,j]=T.useState({editingId:null,body:""}),[P,L]=T.useState(null),[F,K]=T.useState(null),Z=T.useRef(null),te=T.useMemo(()=>new Set(b),[b]),{comments:ie,sidebarOpen:de,onSidebarOpen:_e}=e,fe=T.useMemo(()=>ie.filter(Y=>Fo(t,r,Y)!=="resolved"),[ie,t,r]),ye=T.useMemo(()=>{const Y=new Map;for(const ae of fe)for(const Se of ae.targets)Y.set(Se,(Y.get(Se)??0)+1);return Y},[fe]),Te=Y=>{const ae=Se=>Y===""||Se.startsWith(Y+"/");return fe.filter(Se=>Se.targets.some(Ce=>{const je=$i(Ce);return ae(dr(je.kind==="item"?je.id:je.from.startsWith("i:")?je.to:je.from))})).length},ce=()=>{Z.current?Z.current.focus():window.setTimeout(()=>{var Y;return(Y=Z.current)==null?void 0:Y.focus()},0)},M=(Y,ae)=>{if(Y.length===0)return;let Se=[];Q(Ce=>(ae?Se=Y.every(Pe=>Ce.includes(Pe))?Ce.filter(Pe=>!Y.includes(Pe)):[...Ce,...Y.filter(Pe=>!Ce.includes(Pe))]:Se=Ce.length===Y.length&&Y.every(Pe=>Ce.includes(Pe))?[]:Y,Se)),Y.length&&_e(!0)},J=()=>{Q([]),j({editingId:null,body:""})},ee=T.useRef(e.active);ee.current=e.active,T.useEffect(()=>{const Y=ae=>{!ee.current||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLInputElement||(ae.key==="Escape"&&Q([]),ae.key==="c"&&!ae.metaKey&&!ae.ctrlKey&&!ae.altKey&&(ae.preventDefault(),_e(!0),ce()))};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[]);const he=()=>{if(!H.body.trim()||b.length===0)return;const Y=H.editingId?ie.map(ae=>ae.id===H.editingId?{...ae,targets:b,body:H.body.trim()}:ae):[...ie,{id:`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,targets:b,body:H.body.trim(),createdAt:Date.now()}];e.onCommentsChange(Y),J()},ge=Y=>{const ae=Y.targets.map($i).flatMap(Ce=>Ce.kind==="link"?[Ce]:[]),Se=ae.map(Ce=>Ce.from.startsWith("i:")?Ce.to:Ce.from);U(Ce=>{let je=new Set(Ce);for(const Pe of ae){const nt=Pe.from.startsWith("i:");je=vc(vc(je,nt?"I":"S",Pe.from),nt?"S":"T",Pe.to)}return je}),e.onPin(Se.filter(Ce=>!Ce.startsWith("c:"))),B(Ce=>{const je=new Map(Ce);for(const Pe of Se)Pe.startsWith("f:")&&je.set(`c:${Ue(Pe.slice(2))}`,!0);return je}),A(Ce=>{const je=new Map(Ce);for(const Pe of ae){if(Pe.from.startsWith("i:")){const ut=Pe.from.slice(2),I=ut.startsWith("f:")?Ue(ut.slice(2)):ut.slice(2);for(let se=Ue(I);se;se=Ue(se))je.set(`i:g:${se}`,!0);ut.startsWith("f:")?je.set(`i:d:${I}`,!0).set(`i:g:${I}`,!0):ut.startsWith("d:")?je.set(`i:d:${I}`,!1).set(`i:g:${I}`,!0):je.set(`i:g:${I}`,!1);continue}if(Pe.to.startsWith("x:"))continue;const nt=Pe.to.slice(2),Et=Pe.to.startsWith("t:")?Ue(nt):nt;for(let ut=Ue(Et);ut;ut=Ue(ut))je.set(`g:${ut}`,!0);Pe.to.startsWith("t:")?je.set(`d:${Et}`,!0).set(`g:${Et}`,!0):Pe.to.startsWith("d:")?je.set(`d:${Et}`,!1).set(`g:${Et}`,!0):je.set(`g:${Et}`,!1)}return je}),Q(Y.targets)},xe=Y=>{ge(Y),j({editingId:Y.id,body:Y.body}),ce()},Oe=Y=>{window.clearTimeout(c.current),u(Y)},ot=()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>u(null),80)},X=Y=>{var ae;return((ae=d.current)==null?void 0:ae.querySelector(`[data-id="${CSS.escape(Y)}"]`))??null},pe=(Y,ae)=>Y.getBoundingClientRect().top-ae.getBoundingClientRect().top;T.useLayoutEffect(()=>{const Y=d.current;if(!Y||!w.current)return;const ae=X(w.current.id);ae&&(Y.scrollTop+=pe(ae,Y)-w.current.top),w.current=null},[_]);const W=Y=>{const ae=d.current,Se=X(Y.id);ae&&Se&&(w.current={id:Y.id,top:pe(Se,ae)}),o==="changes"?e.onCollapseToggle(Y.path):e.onToggle(Y.path)},{find:ne,findItem:me}=e,ve=T.useMemo(()=>q1(_),[_]),Qe=T.useRef(ve);Qe.current=ve;const Ae=Y=>Qe.current.get(Y.kind==="file"?af(Y.path):lf(Y.path));T.useEffect(()=>{if(!ne.open||!me)return;let Y=0,ae=0;const Se=()=>{const Ce=Ae(me),je=Ce&&X(Ce.id),Pe=d.current;Ce&&je&&Pe?(Pe.scrollTop+=pe(je,Pe)-Pe.clientHeight/2,me.kind==="file"&&Oe(Ce.id)):++Y<30&&(ae=requestAnimationFrame(Se))};return ae=requestAnimationFrame(Se),()=>cancelAnimationFrame(ae)},[ne.seq]),Jd({root:h,selector:".tlabel",find:ne,on:e.active,current:()=>{var Se;const Y=me&&Ae(me),ae=Y&&((Se=X(Y.id))==null?void 0:Se.querySelector(".tlabel"));return!Y||!ae?null:{el:ae,nth:Qd(ae.textContent??"",ne.query,ne.caseSensitive).filter(Ce=>Ce<Y.offset).length}}});const Ke=Y=>Y?`${t.graph.repoRoot}/${Y}`:t.graph.repoRoot,ft=Y=>{const ae=Y.dir.stats,Se=[["added","追加"],["modified","変更"],["removed","削除"]].filter(([Ce])=>ae[Ce]>0).map(([Ce,je])=>`${je} ${ae[Ce]}`);return Se.length?`(${Se.join("・")})`:""},Ot=Y=>Th(Y.path,e.reviewTargets,e.reviewed)?`
|
|
103
|
+
中の変更したファイルはすべて確認済み`:"",Zt=Y=>{switch(Y.kind){case"file":return`${Ke(Y.path)}
|
|
104
|
+
${Y.file.linesAfter??Y.file.linesBefore} 行`;case"dir":return`${Ke(Y.path)}
|
|
105
|
+
${Y.dir.stats.total} ファイル${ft(Y)}(クリックで開く)${Ot(Y)}`;case"open":return`${Ke(Y.path)}
|
|
106
|
+
${Y.dir.stats.total} ファイル${ft(Y)}(${Y.collapsed?"クリックで開く":"クリックで閉じる"})${Ot(Y)}`}},Ht=Y=>{var Ee;const ae=Y.kind==="open"&&!Y.collapsed,Se=Y.kind==="file"?Y.label:`${Y.label}/`,Ce=Y.kind==="open"&&!Y.collapsed?void 0:N.get(Y.id),je=O.has(Y.id),Pe=ye.get(Qr(Y.id))??0,nt=Y.kind==="dir"||Y.kind==="open"&&Y.collapsed,Et=Pe||(nt?Te(Y.path):0),ut=Y.kind==="file"&&e.reviewTargets.has(Y.path),I=Y.kind==="file"?e.openLabel(Y.path):void 0,se=Y.kind==="file"?e.reviewed.has(Y.path):Y.kind==="dir"||Y.kind==="open"?Th(Y.path,e.reviewTargets,e.reviewed):!1,ke=["trow",Y.kind,Y.status,(Ee=Y.file)!=null&&Ee.isTest?"test":"",je?"pinned":"",se?"reviewed":"",a===Y.id?"hovered":"",te.has(Qr(Y.id))?"picked":"",P!=null&&P.has(Qr(Y.id))?"lit":""].filter(Boolean).join(" ");return f.jsxs("div",{className:ke,"data-id":Y.id,title:Zt(Y),onMouseEnter:()=>Oe(Y.id),onMouseLeave:ot,onClick:G=>{vE(G)?M([Qr(Y.id)],!0):Y.kind!=="file"&&W(Y)},onDoubleClick:I?()=>{var G;return(G=e.onOpenFile)==null?void 0:G.call(e,Y.path)}:void 0,children:[Y.kind==="file"?f.jsxs(f.Fragment,{children:[ut?f.jsx("input",{type:"checkbox",className:"tcheckbox",checked:se,onClick:G=>G.stopPropagation(),onDoubleClick:G=>G.stopPropagation(),onChange:G=>e.onReviewed(Y.path,G.target.checked),"aria-label":`${Y.path} を確認済みにする`,title:"確認済み(このファイルの依存がまた変わると外れます)"}):f.jsx("span",{className:"tcheckbox-space"}),f.jsx(ji,{status:Y.status,small:!0})]}):f.jsxs(f.Fragment,{children:[f.jsx("span",{className:`tfold${ae?" open":""}`,children:f.jsx(Md,{size:12})}),Y.dir&&f.jsx(ji,{status:Y.status,small:!0,title:null})]}),f.jsx("span",{className:"tlabel",children:Se}),f.jsx("span",{className:"tspacer"}),Ce&&f.jsx(Oi,{stats:Ce,title:Xv(Ce)}),Et>0&&f.jsx(Mo,{n:Et,title:Pe?"この行へのコメント":"この中のファイルへのコメント(未対応)"}),l&&(I?f.jsx("button",{className:"tbtn tdiff",onClick:Ga(()=>{var G;return(G=e.onOpenFile)==null?void 0:G.call(e,Y.path)}),title:`${I}(ダブルクリックでも開けます)`,"aria-label":I,children:f.jsx(Od,{size:13})}):f.jsx("span",{className:"tbtn-space"})),f.jsx("button",{className:"tbtn",onClick:Ga(()=>{Q([Qr(Y.id)]),_e(!0),ce()}),title:"この行にコメントを書く(⌘ / Shift + クリックで複数選択)","aria-label":"コメントする",children:f.jsx(Ri,{size:13})}),f.jsx("button",{className:`tbtn tpin${je?" on":""}`,onClick:Ga(()=>e.onTogglePin(Y.id)),title:je?"パネルにピン留め中(クリックでピン留めを外す)":"パネルにピン留めする(表示し続ける)",children:f.jsx(uc,{on:je})})]})},Tt=Y=>Y.map(ae=>ae.kind==="open"?f.jsxs("div",{className:`tgroup ${ae.status}${ae.full?"":" pruned"}${ae.collapsed?" collapsed":""}`,children:[Ht(ae),!ae.collapsed&&f.jsx("div",{className:"tchildren",children:Tt(ae.children)})]},ae.id):f.jsx("div",{children:Ht(ae)},ae.id));return f.jsxs("div",{className:"map",children:[f.jsxs("div",{className:`map-body${de?" with-sidebar":""}`,ref:S,style:{gridTemplateColumns:pE(g?Es(v,g,de):v,de)},children:[f.jsxs("aside",{className:"tree-col",ref:x,children:[f.jsxs("div",{className:"tree-head",children:[f.jsx("div",{className:"ds-seg tree-mode",role:"radiogroup","aria-label":"表示範囲",children:[["changes","変更","変更したファイルだけを表示(依存先は右のパネルに出ます)"],["all","全体","リポジトリ全体のツリーを表示(最初は変更のあるフォルダだけ開いています)"]].map(([Y,ae,Se])=>f.jsx("button",{role:"radio","aria-checked":o===Y,className:o===Y?"on":"",onClick:()=>e.onModeChange(Y),title:Se,children:ae},Y))}),f.jsx("button",{className:"tree-fold",onClick:()=>e.onFold(E,D.shown),title:E?"すべてのフォルダを閉じる":o==="all"?"変更のあるフォルダを開く":"すべてのフォルダを開く",children:E?"−":"+"})]}),f.jsx("div",{className:"map-scroll tree",ref:y,onMouseLeave:ot,children:Tt(_.roots)})]}),f.jsx(Oo,{title:"ドラッグでツリーとパネルの幅を変える(ダブルクリックで元に戻す)",start:()=>{var Y;return((Y=x.current)==null?void 0:Y.getBoundingClientRect().width)??0},onDrag:(Y,ae)=>m(Se=>Es({...Se,tree:Y+ae},g,de)),onEnd:()=>m(Y=>(bs(Y),Y)),onReset:()=>m(Y=>(bs({...Y,tree:void 0}),{...Y,tree:void 0}))}),f.jsx(dE,{model:t,tree:r,pins:s,hovered:a&&!O.has(a)?a:null,onTogglePin:e.onTogglePin,onClearPins:e.onClearPins,selection:te,litKeys:P,commentCounts:ye,onSelectKeys:M,onHoverKey:K,targetOpen:C,sourceOpen:q,onToggleSource:V,onToggleTarget:R,hidden:z,onHiddenChange:U,openLabel:e.openLabel,onOpenFile:e.onOpenFile}),de&&f.jsx(Oo,{title:"ドラッグでコメントの幅を変える(ダブルクリックで元に戻す)",start:()=>Es(v,g,!0).side,onDrag:(Y,ae)=>m(Se=>Es({...Se,side:Y-ae},g,!0)),onEnd:()=>m(Y=>(bs(Y),Y)),onReset:()=>m(Y=>(bs({...Y,side:bl}),{...Y,side:bl}))}),de&&f.jsx(Z1,{ref:Z,model:t,tree:r,comments:ie,selection:b,draft:H,onDraft:j,onSave:he,onCancel:J,onRemoveTarget:Y=>Q(ae=>ae.filter(Se=>Se!==Y)),onClose:()=>_e(!1),onShow:ge,onEdit:xe,onDelete:Y=>{e.onCommentsChange(ie.filter(ae=>ae.id!==Y)),H.editingId===Y&&J()},hoveredKeys:F,onHoverComment:Y=>L(Y?new Set(Y):null)})]}),f.jsx("div",{className:"legend",children:f.jsxs("span",{className:"muted",children:["行にホバーすると右のパネルに依存先が出ます ・ ピンのアイコンでピン留めし、複数並べて比べられます ・ 矢印や箱のクリック(⌘ / Shift で複数)・行の吹き出しでコメント(c キーで入力欄へ)・ 「+n 依存」= 今回増えた import ・",o==="changes"?" 変更していないファイルは「全体」で表示":" フォルダをクリックで開閉"]})})]})}const kE=200,Lh={added:"今回追加",modified:"今回変更",removed:"今回削除"};function bE(e,t){const n=[],r=e.graph.files.filter(i=>i.status!=="unchanged").sort((i,o)=>i.path.localeCompare(o.path));for(const i of r){const o=(e.edgesByFrom.get(i.path)??[]).filter(a=>a.status!=="unchanged").sort((a,u)=>a.to.localeCompare(u.to));if(o.length===0)continue;if(n.length===kE)break;const s=`f:${i.path}`,l=[i.status==="removed"?`- ${i.path}(${Lh.removed})`:`- ${i.path}(${Lh[i.status]}) target: "${Qr(s)}"`];for(const a of o){const u=a.external?`x:${a.to}`:`d:${a.to}`,c=uf(e,t,s,u),d=`${Y1(e,u,c)}${c!=null&&c.typeOnly?"(型のみ)":""}`;l.push(a.status==="added"?` - 追加した import → ${d} target: "${Uv(s,u)}"`:` - 削除した import → ${d}`)}if(i.status!=="removed"&&o.some(a=>a.status==="added"&&!a.external)){const a=X1(e,t,i.dir);a&&l.push(` 参考: ${a}`)}n.push(l.join(`
|
|
107
|
+
`))}return n.length===0?"":["依存の変化(import しているファイルごと):",...n,"","コメントの付け方:",'- target: 上の target の値をそのまま。追加した import を指すなら "L:…"、ファイルそのものを指すなら "I:f:…"',"- path / side / line / endLine / code: null","- ここでは依存の向きと形だけを見てください(層をまたぐ import、同じフォルダの既存のファイルが使っていない依存先、循環、置き場所が合わないファイルなど)。コードの中身への指摘は、ファイルの差分の方に書いてください。","- 削除した import への指摘は、その import をしていたファイルの target に付けてください。"].join(`
|
|
108
|
+
`)}function EE(e,t,n,r){const i=[];for(const o of e){const s=o.target;!s||!/^(L:[^>]+>.+|I:.+)$/.test(s)||cf(t,n,s)!=="open"||i.push({id:Dd(),targets:[s],body:o.body,createdAt:Date.now(),ai:r})}return i}function SE({data:e,active:t,onComments:n,modules:r,openIn:i,ai:o,onAi:s}){const l=e.repoRoot,[a,u]=Xp(`depshape.expanded:${l}`),[c,d]=Xp(`depshape.collapsed:${l}`),h=`depshape.pins:${l}`,[p,y]=T.useState(()=>CE(Yt(h,[])));T.useEffect(()=>_t(h,p),[h,p]);const x=Yv(El(e)),[S,v]=T.useState(()=>Pd(x)),[m,g]=T.useState(qv("mapMode","changes")),[w,$]=T.useState(!1),k=T.useMemo(()=>M1(e),[e]),_=T.useMemo(()=>P1(k),[k]),N=El(e),[D,E]=T.useState(()=>$h(N));T.useEffect(()=>E($h(N)),[N]);const O=T.useMemo(()=>gE(e.files,e.edges),[e]),C=T.useMemo(()=>yE(O,D),[O,D]),A=T.useCallback((ce,M)=>{const J=O.get(ce);J&&E(ee=>{const he={...ee};return M?he[ce]=J:delete he[ce],hE(N,he),he})},[O,N]),R=T.useCallback(ce=>{v(ce),Fd(x,ce)},[x]);T.useEffect(()=>{const ce=S.filter(M=>Fo(k,_.byPath,M)!=="resolved").length;n({open:ce,prompt:()=>Hv(k,_.byPath,S).text,review:()=>bE(k,_.byPath)})},[S,k,_,n]);const q=T.useRef(S);q.current=S;const B=T.useRef(0),[V,z]=T.useState(null);T.useEffect(()=>{if(!o||o.seq===B.current)return;B.current=o.seq;const ce=o.items.filter(J=>J.module==="dep"),M=EE(ce,k,_.byPath,o.agent);M.length&&(R([...q.current,...M]),$(!0)),z({seq:o.seq,placed:M.length,dropped:ce.length-M.length})},[o,k,_,R]),T.useEffect(()=>{V&&s(V)},[V,s]);const U=T.useCallback(ce=>d(M=>{const J=new Set(M);return J.has(ce)?J.delete(ce):J.add(ce),J}),[d]),b=Xd(t),Q=T.useMemo(()=>b.open?V1(k,_.root,m,b.query,b.caseSensitive,Br):[],[k,_,m,b.open,b.query,b.caseSensitive]),H=Q[ql(b,Q.length)]??null,j=T.useCallback(ce=>{m==="all"?u(M=>ce.every(J=>M.has(J))?M:new Set([...M,...ce])):d(M=>{if(!ce.some(ee=>M.has(ee)))return M;const J=new Set(M);for(const ee of ce)J.delete(ee);return J})},[m,u,d]);T.useEffect(()=>{b.open&&H&&j(H.reveal)},[b.seq]);const P=T.useCallback(ce=>y(M=>[...M,...ce.filter(J=>!M.includes(J))]),[]),L=T.useCallback(ce=>y(M=>M.includes(ce)?M.filter(J=>J!==ce):[...M,ce]),[]),F=T.useCallback(ce=>u(M=>{const J=new Set(M);if(J.has(ce))for(const ee of[...J])(ee===ce||ee.startsWith(ce+"/"))&&J.delete(ee);else J.add(ce);return J}),[u]),K=r.includes("file"),Z=T.useCallback(ce=>{const M=k.fileByPath.get(ce);if(!(!K||!M))return M.status==="unchanged"?"ファイルを開く":"差分を開く"},[k,K]),te=T.useMemo(()=>K?ce=>i("file",ce):null,[K,i]),ie=T.useMemo(()=>{const ce=new Set;for(const M of k.changedDirs){ce.add(M);for(const J of Rv(M))ce.add(J)}return ce},[k]),de=T.useRef(!1);T.useEffect(()=>{m!=="all"||de.current||(de.current=!0,a.size===0&&u(new Set(ie)))},[m,a,ie,u]);const _e=(ce,M)=>{m==="all"?u(ce?new Set:new Set(ie)):d(ce?new Set(M):new Set)},fe=NE(k.graph.files),ye=S.filter(ce=>Fo(k,_.byPath,ce)!=="resolved").length,Te=jE(k.graph.edges);return f.jsxs("div",{className:"app",children:[f.jsxs(Vd,{children:[f.jsxs(qd,{children:[f.jsx(_i,{children:"ファイル"}),f.jsx(Wd,{stats:fe,unit:"ファイル",showZero:!0}),f.jsx(Kd,{}),f.jsx(_i,{children:"依存"}),f.jsx(Oi,{stats:Te,title:Xv(Te),showZero:!0})]}),f.jsx(Gd,{}),f.jsx(Zd,{find:b,count:Q.length,placeholder:"ファイル名・フォルダ名を検索"}),f.jsx(Yd,{done:C.size,total:O.size,title:"確認済みにした、変更したファイル(そのファイルの依存がまた変わると外れます)"}),f.jsxs("button",{className:`ds-btn${w?" on":""}`,onClick:()=>$(!w),title:"コメントのサイドバーを開閉",children:[f.jsx(Ri,{size:13}),"コメント ",S.length,S.length>0&&f.jsxs("span",{className:"muted",children:["(未対応 ",ye,")"]})]})]}),f.jsx("main",{children:f.jsx(wE,{model:k,root:_.root,tree:_.byPath,mode:m,onModeChange:ce=>{g(ce),Kv("mapMode",ce)},open:a,onToggle:F,collapsed:c,onCollapseToggle:U,find:b,findItem:H,onFold:_e,pins:p,onTogglePin:L,onClearPins:()=>y([]),onPin:P,reviewTargets:O,reviewed:C,onReviewed:A,comments:S,onCommentsChange:R,sidebarOpen:w,onSidebarOpen:$,active:t,openLabel:Z,onOpenFile:te})})]})}const CE=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function NE(e){const t={added:0,modified:0,removed:0};for(const n of e)n.status!=="unchanged"&&t[n.status]++;return t}function jE(e){const t={added:0,removed:0};for(const n of e)!n.external&&n.status!=="unchanged"&&t[n.status]++;return t}const _E={id:"dep",title:"依存",heading:"依存関係",description:"コードの依存関係(depshape): フォルダ・ファイルの import の変化",icon:Z0,View:SE,badge:e=>e.files.filter(t=>t.status!=="unchanged").length||void 0,clearReview:e=>{Ko(Yv(El(e))),mE(El(e))}},Ar=e=>!!e.file||!!e.plain;function Ih(e,t=[]){const n={name:"",path:"",children:[]},r=new Map([[n,new Map]]),i=new Set(e.map(s=>s.path)),o=(s,l)=>{const a=s.split("/");let u=n;for(let c=0;c<a.length-1;c++){const d=r.get(u);let h=d.get(a[c]);h||(h={name:a[c],path:a.slice(0,c+1).join("/"),children:[]},u.children.push(h),d.set(a[c],h),r.set(h,new Map)),u=h}u.children.push({name:a[a.length-1],path:s,children:[],...l})};for(const s of e)o(s.path,{file:s});for(const s of t)i.has(s)||o(s,{plain:!0});return Zv(Qv(n))}function Qv(e){let t={...e,children:e.children.map(Qv)};for(;t.path!==""&&!Ar(t)&&t.children.length===1&&!Ar(t.children[0]);){const n=t.children[0];t={...n,name:`${t.name}/${n.name}`}}return t}function Zv(e){const t=e.children.map(Zv).sort((n,r)=>Ar(n)!==Ar(r)?Ar(n)?1:-1:n.name.localeCompare(r.name));return{...e,children:t}}function Jv(e){return e.file?[e.file]:e.children.flatMap(Jv)}function ex(e){return Ar(e)?[]:[...e.path?[e.path]:[],...e.children.flatMap(ex)]}function $E(e){const t=new Set,n=r=>{if(Ar(r))return!!r.file&&!r.file.unchanged;let i=!1;for(const o of r.children)n(o)&&(i=!0);return i&&r.path&&t.add(r.path),i};return n(e),t}function tx(e,t){const n=t.trim().toLowerCase();if(!n)return e;if(e.file)return e.file.path.toLowerCase().includes(n)||(e.file.oldPath??"").toLowerCase().includes(n)?e:null;if(e.plain)return e.path.toLowerCase().includes(n)?e:null;const r=e.children.map(i=>tx(i,n)).filter(i=>i!==null);return r.length||e.path===""?{...e,children:r}:null}const Ya=(e,t)=>t===0?e+1:e,Xa=(e,t)=>t===0?e:e+t-1,nx=e=>!e.unchanged&&e.status!=="added"&&e.status!=="removed"&&!e.binary&&!e.large&&e.chunks.length>0;function Qa(e,t){const n={path:e,status:"modified",additions:0,deletions:0,unchanged:!0};if(!t)return{...n,chunks:[],loading:!0};if(t.binary)return{...n,chunks:[],binary:!0};if(t.large||!t.lines)return{...n,chunks:[],large:!0};const r=t.lines.length;if(r===0)return{...n,chunks:[]};const i=t.lines.map((o,s)=>({type:"normal",content:o,oldLine:s+1,newLine:s+1}));return{...n,chunks:[{section:"",oldStart:1,oldLines:r,newStart:1,newLines:r,lines:i}]}}function Xl(e,t){if(!nx(e))return[];const n=e.chunks;return Array.from({length:n.length+1},(r,i)=>{const o=n[i-1],s=n[i],l=o?Xa(o.newStart,o.newLines)+1:1,a=s?Ya(s.newStart,s.newLines)-1:t,u=o?Xa(o.oldStart,o.oldLines)-Xa(o.newStart,o.newLines):Ya(s.oldStart,s.oldLines)-Ya(s.newStart,s.newLines);return{index:i,from:l,to:a,delta:u}})}const Cr=20,Ah=(e,t)=>e.to===void 0?void 0:Math.max(0,e.to-e.from+1-((t==null?void 0:t.top)??0)-((t==null?void 0:t.bottom)??0));function rx(e,t,n){if(e.unchanged)return e.chunks.flatMap(l=>l.lines.map(a=>({kind:"line",line:a})));const r=[],i=Xl(e,t==null?void 0:t.length),o=(l,a,u)=>{if(t)for(let c=a;c<=u;c++)t[c-1]!==void 0&&r.push({kind:"line",opened:!0,line:{type:"normal",content:t[c-1],oldLine:c+l.delta,newLine:c}})};e.chunks.forEach((l,a)=>{const u=i[a];if(u){const c=t?n[a]:void 0,d=Ah(u,c),h=Math.min((c==null?void 0:c.top)??0,u.to-u.from+1);o(u,u.from,u.from+h-1),(d>0||a===0)&&r.push({kind:"gap",gap:u,hidden:d,chunk:l}),o(u,u.from+h+d,u.to)}else r.push({kind:"gap",gap:{index:a,from:1,to:0,delta:0},hidden:0,chunk:l});for(const c of l.lines)r.push({kind:"line",line:c})});const s=i[e.chunks.length];if(s){const l=t?n[s.index]:void 0,a=Ah(s,l);t&&o(s,s.from,s.from+((l==null?void 0:l.top)??0)-1),(a===void 0||a>0)&&r.push({kind:"gap",gap:s,hidden:a})}return r}function TE(e,t,n,r){const i=(t.to??r)-t.from+1,o=e[t.index]??{top:0,bottom:0},s=Math.max(0,i-o.top-o.bottom),l=n==="all"?{top:i-o.bottom,bottom:o.bottom}:n==="down"?{...o,top:o.top+Math.min(Cr,s)}:{...o,bottom:o.bottom+Math.min(Cr,s)};return{...e,[t.index]:l}}function LE(e,t,n,r,i){let o=n;for(const s of Xl(e,t)){const l=s.to??t;if(i<s.from||r>l)continue;const a=o[s.index]??{top:0,bottom:0},u=Math.min(l-s.from+1,Math.max(a.top,Math.min(i,l)-s.from+1+3));u!==a.top&&(o={...o,[s.index]:{...a,top:u}})}return o}function xc(e,t){for(const n of Xl(e)){const r=t-n.delta;if(r>=n.from&&(n.to===void 0||r<=n.to))return r}}function ix(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type==="normal"){t.push({old:r,new:r}),n++;continue}const i=[];for(;n<e.length&&e[n].type==="delete";)i.push(e[n++]);const o=[];for(;n<e.length&&e[n].type==="add";)o.push(e[n++]);for(let s=0;s<Math.max(i.length,o.length);s++)t.push({old:i[s],new:o[s]})}return t}const Rh=500,Oh=e=>e.match(/[\p{L}\p{N}_]+|\s+|[^\p{L}\p{N}_\s]/gu)??[];function IE(e,t){if(!e.trim()||!t.trim()||e===t||e.length>Rh||t.length>Rh)return;const n=Oh(e),r=Oh(t),i=r.length+1,o=new Uint16Array((n.length+1)*i);for(let d=n.length-1;d>=0;d--)for(let h=r.length-1;h>=0;h--)o[d*i+h]=n[d]===r[h]?o[(d+1)*i+h+1]+1:Math.max(o[(d+1)*i+h],o[d*i+h+1]);const s=new Array(n.length).fill(!1),l=new Array(r.length).fill(!1);for(let d=0,h=0;d<n.length&&h<r.length;)n[d]===r[h]?(s[d++]=!0,l[h++]=!0):o[(d+1)*i+h]>=o[d*i+h+1]?d++:h++;const a=d=>d.trim().length,u=n.reduce((d,h,p)=>d+(s[p]?a(h):0),0),c=n.reduce((d,h)=>d+a(h),0)+r.reduce((d,h)=>d+a(h),0);if(!(c===0||2*u/c<.4))return{old:Mh(n,s),new:Mh(r,l)}}function Mh(e,t){t=t.map((i,o)=>i&&!(o>0&&o<e.length-1&&!e[o].trim()&&!t[o-1]&&!t[o+1]));const n=[];let r=0;return e.forEach((i,o)=>{const s=r+i.length;if(!t[o]){const l=n[n.length-1];l&&l[1]===r?l[1]=s:n.push([r,s])}r=s}),n}function AE(e){var n,r;const t=new Map;for(const i of ix(e)){if(((n=i.old)==null?void 0:n.type)!=="delete"||((r=i.new)==null?void 0:r.type)!=="add")continue;const o=IE(i.old.content,i.new.content);o&&(t.set(`old:${i.old.oldLine}`,o.old),t.set(`new:${i.new.newLine}`,o.new))}return t}function RE(e,t){if(!t.length)return e;const n=[];let r=0;for(const i of e){const o=r+i.text.length;let s=r;for(const[l,a]of t){if(a<=s||l>=o)continue;l>s&&n.push({...i,text:i.text.slice(s-r,l-r)});const u=Math.min(a,o);n.push({...i,text:i.text.slice(Math.max(l,s)-r,u-r),mark:!0}),s=u}s<o&&n.push({...i,text:i.text.slice(s-r)}),r=o}return n}function OE(e){return co([e.status,e.oldPath??"",e.modeChange??"",e.binary?"binary":"",e.chunks.map(t=>t.lines.filter(n=>n.type!=="normal").map(n=>`${n.type==="add"?"+":"-"}${n.content}`))])}const ox=e=>e.chunks.reduce((t,n)=>t+n.lines.length,0);function ME(e){const t={added:0,modified:0,removed:0};for(const n of e)t[n.status==="renamed"?"modified":n.status]++;return t}function PE(e){return e.reduce((t,n)=>({added:t.added+n.additions,removed:t.removed+n.deletions}),{added:0,removed:0})}function ff(e,t,n){const r=new Map;n&&t==="new"&&n.forEach((i,o)=>r.set(o+1,i));for(const i of e.chunks)for(const o of i.lines)t==="old"&&o.type!=="add"&&r.set(o.oldLine,o.content),t==="new"&&o.type!=="delete"&&r.set(o.newLine,o.content);if(n&&t==="old"){const i=Math.max(0,...e.chunks.map(o=>o.oldStart+o.oldLines))+n.length;for(let o=1;o<=i;o++){if(r.has(o))continue;const s=xc(e,o);s!==void 0&&n[s-1]!==void 0&&r.set(o,n[s-1])}}return r}const FE=e=>(e.endLine??e.line)-e.line+1;function zo(e,t,n){if(!e)return{state:"resolved"};const r=ff(e,t.side,n),i=t.code.split(`
|
|
109
|
+
`),o=FE(t),s=u=>i.every((c,d)=>r.get(u+d)===c),l=(u,c)=>({state:c,line:u,...o>1?{endLine:u+o-1}:{}});if(s(t.line))return l(t.line,"open");let a;for(const[u,c]of r)c===i[0]&&s(u)&&(a===void 0||Math.abs(u-t.line)<Math.abs(a-t.line))&&(a=u);return a!==void 0?l(a,"open"):r.has(t.line)?l(t.line,"updated"):{state:"resolved"}}function Ph(e,t){const n=ff(e,t.side);for(let r=t.line;r<=(t.endLine??t.line);r++)if(!n.has(r))return!1;return!0}const _n=(e,t)=>e.files.find(n=>n.path===t),DE=(e,t,n)=>zo(_n(e,t.path),t,n).state;function Fh(e,t,n=!1){return{id:Dd(),path:e.path,side:e.side,line:e.line,...e.endLine&&e.endLine!==e.line?{endLine:e.endLine}:{},code:e.code,body:t,createdAt:Date.now(),...n?{unchanged:!0}:{}}}const wc=(e,t,n,r)=>`${e}:L${n}${r&&r!==n?`-L${r}`:""}${t==="old"?" (old)":""}`,zE={old:"変更前",new:"変更後"},kc=(e,t,n,r)=>{const i=`${n&&n!==t?`${t}〜${n}`:t} 行目`;return r?`${i}(変更なし)`:`${zE[e]}の ${i}`};function sx(e,t,n={}){const r=t.map(s=>{var l;return{c:s,at:zo(_n(e,s.path),s,(l=n.contents)==null?void 0:l.get(s.path))}}),i=n.includeResolved?r:r.filter(s=>s.at.state!=="resolved"),o=i.map(({c:s,at:l})=>zd(wc(s.path,s.side,l.line??s.line,l.line!==void 0?l.endLine:s.endLine),s.body));return{text:Bd(o),included:i.length,skipped:t.length-i.length}}const pf="fileshape.comments:",BE=e=>Pd(pf+e),UE=(e,t)=>Fd(pf+e,t),HE=e=>Ko(pf+e),lx=(e,t)=>`path=${encodeURIComponent(e)}&side=${t}`;async function ax(e,t){const n=await fetch(`/api/module/file/content?${lx(e,t)}`);if(!n.ok)throw new Error(await n.text());return(await n.json()).lines}async function WE(){const e=await fetch("/api/module/file/files");if(!e.ok)throw new Error(await e.text());return(await e.json()).paths}async function Dh(e){const t=await fetch(`/api/module/file/plain?path=${encodeURIComponent(e)}`);if(t.status===404)return null;if(!t.ok)throw new Error(await t.text());return await t.json()}const ux=(e,t,n)=>`/api/module/file/raw?${lx(e,t)}&v=${n}`,VE=/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)$/i,bc=e=>VE.test(e),qE=e=>/\.(md|markdown|mdx)$/i.test(e),cx=T.createContext(null),hf=()=>T.useContext(cx),Zr=(e,t)=>`${e}:${t}`;function KE({comments:e,composing:t}){var r;const n=hf();return f.jsxs("div",{className:"fs-thread",children:[e.map(i=>n.editing===i.id?f.jsx(Ec,{initial:i.body,label:kc(i.side,i.line,i.endLine,i.unchanged),onSave:o=>n.update(i.id,o),onCancel:()=>n.edit(null)},i.id):f.jsx(mf,{c:i},i.id)),t&&f.jsx(Ec,{initial:"",label:kc(t.side,t.line,t.endLine,!!((r=_n(n.run,t.path))!=null&&r.unchanged)),onSave:i=>n.add(t,i),onCancel:()=>n.compose(null)})]})}function mf({c:e,showWhere:t}){const n=hf(),r=zo(_n(n.run,e.path),e,n.contents.get(e.path));if(t&&n.editing===e.id)return f.jsx(Ec,{initial:e.body,label:wc(e.path,e.side,e.line,e.endLine),onSave:o=>n.update(e.id,o),onCancel:()=>n.edit(null)});const i=e.endLine!==void 0&&e.endLine!==e.line;return f.jsx(Ud,{body:e.body,state:r.state,ai:e.ai,top:t?f.jsxs("span",{className:"fs-comment-where",children:[wc(e.path,e.side,e.line,e.endLine)," ",f.jsx("code",{children:e.code.split(`
|
|
110
|
+
`)[0].trim()||"(空行)"}),i&&f.jsx("span",{className:"ds-muted",children:" ほか"})]}):i?f.jsx("span",{className:"ds-muted",children:kc(e.side,r.line??e.line,r.line!==void 0?r.endLine:e.endLine,e.unchanged)}):void 0,stateTitle:r.state==="updated"?`コメントしたときは: ${e.code.trim()}`:r.state==="resolved"?"この行は差分からなくなりました":void 0,onCopy:()=>Ai(sx(n.run,[e],{includeResolved:!0,contents:n.contents}).text),onEdit:()=>n.edit(e.id),onDelete:()=>n.remove(e.id)})}function Ec({initial:e,label:t,onSave:n,onCancel:r}){const[i,o]=T.useState(e);return f.jsx(Hd,{autoFocus:!0,editing:e!=="",top:f.jsxs("span",{className:"ds-muted",children:[t,e===""&&"(行番号を Shift+クリックかドラッグすると範囲になります)"]}),value:i,placeholder:"気になる点や直してほしいこと",onChange:o,onSave:()=>i.trim()&&n(i.trim()),onCancel:r})}const GE=e=>Math.min(e.a,e.b),YE=e=>Math.max(e.a,e.b),Xr=(e,t)=>e==="old"?t.type!=="add"?t.oldLine:void 0:t.type!=="delete"?t.newLine:void 0,XE=T.memo(function({file:t,mode:n,rows:r,tokens:i,byLine:o,onExpand:s}){var O;const l=hf(),a=((O=l.composing)==null?void 0:O.path)===t.path?l.composing:null,u=T.useMemo(()=>{const C=new Map;for(const A of t.chunks)for(const[R,q]of AE(A.lines))C.set(R,q);return C},[t]),c=T.useMemo(()=>{const C={old:new Map,new:new Map};for(const A of r)if(A.kind==="line")for(const R of["old","new"]){const q=Xr(R,A.line);q!==void 0&&C[R].set(q,A.line.content)}return C},[r]),d=(C,A,R)=>{const q=Math.min(A,R),B=Math.max(A,R),V=[];let z=q;for(let U=q;U<=B;U++){const b=c[C].get(U);if(b===void 0)break;V.push(b),z=U}return{path:t.path,side:C,line:q,...z>q?{endLine:z}:{},code:V.join(`
|
|
111
|
+
`)}},[h,p]=T.useState(null),y=T.useRef(null);y.current=h;const x=T.useRef(()=>{});x.current=()=>{const C=y.current;p(null),C&&l.compose(d(C.side,C.a,C.b))};const S=h!==null;T.useEffect(()=>{if(!S)return;const C=()=>x.current();return window.addEventListener("mouseup",C),()=>window.removeEventListener("mouseup",C)},[S]);const v=h??(a?{side:a.side,a:a.line,b:a.endLine??a.line}:null),m=(C,A)=>!!v&&A!==void 0&&v.side===C&&A>=GE(v)&&A<=YE(v),g=(C,A)=>{const R=A?Xr(C,A):void 0;return!A||R===void 0?f.jsx("td",{className:"fs-num empty"}):f.jsx("td",{className:`fs-num${m(C,R)?" selected":""}`,onMouseDown:q=>{if(q.button===0){if(q.preventDefault(),q.shiftKey&&a&&a.side===C){l.compose(d(C,a.line,R));return}p({side:C,a:R,b:R})}},onMouseEnter:()=>{y.current&&y.current.side===C&&p({...y.current,b:R})},title:`${C==="old"?"変更前":"変更後"}の ${R} 行目にコメントする(Shift+クリックかドラッグで範囲)`,children:R})},w=(C,A)=>{const R=Xr(C,A),q=(A.type==="normal"?(i==null?void 0:i.get(Zr("new",A.newLine)))??(i==null?void 0:i.get(Zr("old",A.oldLine))):i==null?void 0:i.get(Zr(C,R)))??[{types:"",text:A.content}];return RE(q,u.get(Zr(C,R))??[]).map((V,z)=>{const U=[V.types?`token ${V.types}`:"",V.mark?`fs-word ${C}`:""].filter(Boolean).join(" ");return U?f.jsx("span",{className:U,children:V.text},z):f.jsx(T.Fragment,{children:V.text},z)})},$=(C,A)=>{const R=[...new Set(C.flatMap(([V,z])=>o.get(Zr(V,z))??[]))],q=a?a.endLine??a.line:void 0,B=a&&C.some(([V,z])=>a.side===V&&q===z)?a:void 0;return!R.length&&!B?null:f.jsx("tr",{className:"fs-thread-row",children:f.jsx("td",{colSpan:A,children:f.jsx(KE,{comments:R,composing:B})})})},k=(C,A,R)=>{const{gap:q,hidden:B,chunk:V}=C,z=q.index>0,U=!!V,b=(H,j,P)=>f.jsx("button",{className:"fs-expand",onClick:()=>s(q,H),title:P,"aria-label":P,children:j}),Q=B===void 0||B>0;return f.jsx("tr",{className:"fs-hunk",children:f.jsxs("td",{colSpan:A,children:[f.jsx("span",{className:"fs-expanders",children:Q&&(B!==void 0&&B<=Cr&&z&&U?b("all","↕",`${B} 行をすべて表示`):[U&&b("up","↑",`上の ${Math.min(Cr,B??Cr)} 行を表示`),z&&b("down","↓",B===void 0?"下の行を表示":`下の ${Math.min(Cr,B)} 行を表示`),B!==void 0&&B>Cr&&b("all","⇕",`${B} 行をすべて表示`)].filter(Boolean).map((H,j)=>f.jsx(T.Fragment,{children:H},j)))}),V?f.jsxs(f.Fragment,{children:["@@ -",V.oldStart,",",V.oldLines," +",V.newStart,",",V.newLines," @@",V.section&&f.jsxs("span",{className:"fs-hunk-section",children:[" ",V.section]})]}):f.jsx("span",{children:B===void 0?"ファイルの残りを表示":`残り ${B} 行`})]})},`g${R}`)};if(n==="unified"){const C=!!t.unchanged,A=C?3:4;return f.jsxs("table",{className:`fs-table unified${C?" plain":""}`,children:[f.jsxs("colgroup",{children:[!C&&f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{})]}),f.jsx("tbody",{children:r.map((R,q)=>{if(R.kind==="gap")return k(R,A,q);const B=R.line,V=B.type==="delete"?"old":"new",z=C?[["new",B.newLine]]:B.type==="normal"?[["old",B.oldLine],["new",B.newLine]]:[[V,Xr(V,B)]],U=z.some(([b,Q])=>m(b,Q));return f.jsxs(T.Fragment,{children:[f.jsxs("tr",{className:`fs-line ${B.type}${R.opened?" opened":""}${U?" selected":""}`,children:[!C&&g("old",B.type==="add"?void 0:B),g("new",B.type==="delete"?void 0:B),f.jsx("td",{className:"fs-sign",children:B.type==="add"?"+":B.type==="delete"?"-":" "}),f.jsx("td",{className:"fs-code","data-find":`${V}:${Xr(V,B)}`,children:w(V,B)})]}),$(z,A)]},q)})})]})}const _=[];let N=[],D=new Set;const E=()=>{ix(N).forEach((C,A)=>{var B,V;const R=[];C.old&&R.push(["old",C.old.oldLine]),C.new&&R.push(["new",C.new.newLine]);const q=(z,U)=>`${z?z.type:"empty"}${z&&m(U,Xr(U,z))?" selected":""}`;_.push(f.jsxs(T.Fragment,{children:[f.jsxs("tr",{className:`fs-line${C.old&&D.has(C.old)?" opened":""}`,children:[g("old",C.old),f.jsx("td",{className:`fs-sign ${q(C.old,"old")}`,children:((B=C.old)==null?void 0:B.type)==="delete"?"-":" "}),f.jsx("td",{className:`fs-code ${q(C.old,"old")}`,"data-find":C.old?`old:${C.old.oldLine}`:void 0,children:C.old&&w("old",C.old)}),g("new",C.new),f.jsx("td",{className:`fs-sign ${q(C.new,"new")}`,children:((V=C.new)==null?void 0:V.type)==="add"?"+":" "}),f.jsx("td",{className:`fs-code ${q(C.new,"new")}`,"data-find":C.new?`new:${C.new.newLine}`:void 0,children:C.new&&w("new",C.new)})]}),$(R,6)]},`l${_.length}-${A}`))}),N=[],D=new Set};return r.forEach((C,A)=>{C.kind==="gap"?(E(),_.push(k(C,6,A))):(N.push(C.line),C.opened&&D.add(C.line))}),E(),f.jsxs("table",{className:"fs-table split",children:[f.jsxs("colgroup",{children:[f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{className:"fs-col-half"}),f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{className:"fs-col-half"})]}),f.jsx("tbody",{children:_})]})});var dx={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
112
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
113
|
+
*
|
|
114
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
115
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
116
|
+
* @namespace
|
|
117
|
+
* @public
|
|
118
|
+
*/var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function m(g){return g instanceof a?new a(g.type,m(g.content),g.alias):Array.isArray(g)?g.map(m):g.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++o}),m.__id},clone:function m(g,w){w=w||{};var $,k;switch(l.util.type(g)){case"Object":if(k=l.util.objId(g),w[k])return w[k];$={},w[k]=$;for(var _ in g)g.hasOwnProperty(_)&&($[_]=m(g[_],w));return $;case"Array":return k=l.util.objId(g),w[k]?w[k]:($=[],w[k]=$,g.forEach(function(N,D){$[D]=m(N,w)}),$);default:return g}},getLanguage:function(m){for(;m;){var g=i.exec(m.className);if(g)return g[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,g){m.className=m.className.replace(RegExp(i,"gi"),""),m.classList.add("language-"+g)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch($){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec($.stack)||[])[1];if(m){var g=document.getElementsByTagName("script");for(var w in g)if(g[w].src==m)return g[w]}return null}},isActive:function(m,g,w){for(var $="no-"+g;m;){var k=m.classList;if(k.contains(g))return!0;if(k.contains($))return!1;m=m.parentElement}return!!w}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(m,g){var w=l.util.clone(l.languages[m]);for(var $ in g)w[$]=g[$];return w},insertBefore:function(m,g,w,$){$=$||l.languages;var k=$[m],_={};for(var N in k)if(k.hasOwnProperty(N)){if(N==g)for(var D in w)w.hasOwnProperty(D)&&(_[D]=w[D]);w.hasOwnProperty(N)||(_[N]=k[N])}var E=$[m];return $[m]=_,l.languages.DFS(l.languages,function(O,C){C===E&&O!=m&&(this[O]=_)}),_},DFS:function m(g,w,$,k){k=k||{};var _=l.util.objId;for(var N in g)if(g.hasOwnProperty(N)){w.call(g,N,g[N],$||N);var D=g[N],E=l.util.type(D);E==="Object"&&!k[_(D)]?(k[_(D)]=!0,m(D,w,null,k)):E==="Array"&&!k[_(D)]&&(k[_(D)]=!0,m(D,w,N,k))}}},plugins:{},highlightAll:function(m,g){l.highlightAllUnder(document,m,g)},highlightAllUnder:function(m,g,w){var $={callback:w,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",$),$.elements=Array.prototype.slice.apply($.container.querySelectorAll($.selector)),l.hooks.run("before-all-elements-highlight",$);for(var k=0,_;_=$.elements[k++];)l.highlightElement(_,g===!0,$.callback)},highlightElement:function(m,g,w){var $=l.util.getLanguage(m),k=l.languages[$];l.util.setLanguage(m,$);var _=m.parentElement;_&&_.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(_,$);var N=m.textContent,D={element:m,language:$,grammar:k,code:N};function E(C){D.highlightedCode=C,l.hooks.run("before-insert",D),D.element.innerHTML=D.highlightedCode,l.hooks.run("after-highlight",D),l.hooks.run("complete",D),w&&w.call(D.element)}if(l.hooks.run("before-sanity-check",D),_=D.element.parentElement,_&&_.nodeName.toLowerCase()==="pre"&&!_.hasAttribute("tabindex")&&_.setAttribute("tabindex","0"),!D.code){l.hooks.run("complete",D),w&&w.call(D.element);return}if(l.hooks.run("before-highlight",D),!D.grammar){E(l.util.encode(D.code));return}if(g&&r.Worker){var O=new Worker(l.filename);O.onmessage=function(C){E(C.data)},O.postMessage(JSON.stringify({language:D.language,code:D.code,immediateClose:!0}))}else E(l.highlight(D.code,D.grammar,D.language))},highlight:function(m,g,w){var $={code:m,grammar:g,language:w};if(l.hooks.run("before-tokenize",$),!$.grammar)throw new Error('The language "'+$.language+'" has no grammar.');return $.tokens=l.tokenize($.code,$.grammar),l.hooks.run("after-tokenize",$),a.stringify(l.util.encode($.tokens),$.language)},tokenize:function(m,g){var w=g.rest;if(w){for(var $ in w)g[$]=w[$];delete g.rest}var k=new d;return h(k,k.head,m),c(m,k,g,k.head,0),y(k)},hooks:{all:{},add:function(m,g){var w=l.hooks.all;w[m]=w[m]||[],w[m].push(g)},run:function(m,g){var w=l.hooks.all[m];if(!(!w||!w.length))for(var $=0,k;k=w[$++];)k(g)}},Token:a};r.Prism=l;function a(m,g,w,$){this.type=m,this.content=g,this.alias=w,this.length=($||"").length|0}a.stringify=function m(g,w){if(typeof g=="string")return g;if(Array.isArray(g)){var $="";return g.forEach(function(E){$+=m(E,w)}),$}var k={type:g.type,content:m(g.content,w),tag:"span",classes:["token",g.type],attributes:{},language:w},_=g.alias;_&&(Array.isArray(_)?Array.prototype.push.apply(k.classes,_):k.classes.push(_)),l.hooks.run("wrap",k);var N="";for(var D in k.attributes)N+=" "+D+'="'+(k.attributes[D]||"").replace(/"/g,""")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+N+">"+k.content+"</"+k.tag+">"};function u(m,g,w,$){m.lastIndex=g;var k=m.exec(w);if(k&&$&&k[1]){var _=k[1].length;k.index+=_,k[0]=k[0].slice(_)}return k}function c(m,g,w,$,k,_){for(var N in w)if(!(!w.hasOwnProperty(N)||!w[N])){var D=w[N];D=Array.isArray(D)?D:[D];for(var E=0;E<D.length;++E){if(_&&_.cause==N+","+E)return;var O=D[E],C=O.inside,A=!!O.lookbehind,R=!!O.greedy,q=O.alias;if(R&&!O.pattern.global){var B=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,B+"g")}for(var V=O.pattern||O,z=$.next,U=k;z!==g.tail&&!(_&&U>=_.reach);U+=z.value.length,z=z.next){var b=z.value;if(g.length>m.length)return;if(!(b instanceof a)){var Q=1,H;if(R){if(H=u(V,U,m,A),!H||H.index>=m.length)break;var F=H.index,j=H.index+H[0].length,P=U;for(P+=z.value.length;F>=P;)z=z.next,P+=z.value.length;if(P-=z.value.length,U=P,z.value instanceof a)continue;for(var L=z;L!==g.tail&&(P<j||typeof L.value=="string");L=L.next)Q++,P+=L.value.length;Q--,b=m.slice(U,P),H.index-=U}else if(H=u(V,0,b,A),!H)continue;var F=H.index,K=H[0],Z=b.slice(0,F),te=b.slice(F+K.length),ie=U+b.length;_&&ie>_.reach&&(_.reach=ie);var de=z.prev;Z&&(de=h(g,de,Z),U+=Z.length),p(g,de,Q);var _e=new a(N,C?l.tokenize(K,C):K,q,K);if(z=h(g,de,_e),te&&h(g,z,te),Q>1){var fe={cause:N+","+E,reach:ie};c(m,g,w,z.prev,U,fe),_&&fe.reach>_.reach&&(_.reach=fe.reach)}}}}}}function d(){var m={value:null,prev:null,next:null},g={value:null,prev:m,next:null};m.next=g,this.head=m,this.tail=g,this.length=0}function h(m,g,w){var $=g.next,k={value:w,prev:g,next:$};return g.next=k,$.prev=k,m.length++,k}function p(m,g,w){for(var $=g.next,k=0;k<w&&$!==m.tail;k++)$=$.next;g.next=$,$.prev=g,m.length-=k}function y(m){for(var g=[],w=m.head.next;w!==m.tail;)g.push(w.value),w=w.next;return g}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(m){var g=JSON.parse(m.data),w=g.language,$=g.code,k=g.immediateClose;r.postMessage(l.highlight($,l.languages[w],w)),k&&r.close()},!1)),l;var x=l.util.currentScript();x&&(l.filename=x.src,x.hasAttribute("data-manual")&&(l.manual=!0));function S(){l.manual||l.highlightAll()}if(!l.manual){var v=document.readyState;v==="loading"||v==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",S):window.requestAnimationFrame?window.requestAnimationFrame(S):window.setTimeout(S,16)}return l}(t);e.exports&&(e.exports=n),typeof zf<"u"&&(zf.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};l["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(x,S){return"✖ Error "+x+" while fetching file: "+S},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",u="loaded",c="failed",d="pre[data-src]:not(["+l+'="'+u+'"]):not(['+l+'="'+a+'"])';function h(x,S,v){var m=new XMLHttpRequest;m.open("GET",x,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?S(m.responseText):m.status>=400?v(i(m.status,m.statusText)):v(o))},m.send(null)}function p(x){var S=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(S){var v=Number(S[1]),m=S[2],g=S[3];return m?g?[v,Number(g)]:[v,void 0]:[v,v]}}n.hooks.add("before-highlightall",function(x){x.selector+=", "+d}),n.hooks.add("before-sanity-check",function(x){var S=x.element;if(S.matches(d)){x.code="",S.setAttribute(l,a);var v=S.appendChild(document.createElement("CODE"));v.textContent=r;var m=S.getAttribute("data-src"),g=x.language;if(g==="none"){var w=(/\.(\w+)$/.exec(m)||[,"none"])[1];g=s[w]||w}n.util.setLanguage(v,g),n.util.setLanguage(S,g);var $=n.plugins.autoloader;$&&$.loadLanguages(g),h(m,function(k){S.setAttribute(l,u);var _=p(S.getAttribute("data-range"));if(_){var N=k.split(/\r\n?|\n/g),D=_[0],E=_[1]==null?N.length:_[1];D<0&&(D+=N.length),D=Math.max(0,Math.min(D-1,N.length)),E<0&&(E+=N.length),E=Math.max(0,Math.min(E,N.length)),k=N.slice(D,E).join(`
|
|
119
|
+
`),S.hasAttribute("data-start")||S.setAttribute("data-start",String(D+1))}v.textContent=k,n.highlightElement(v)},function(k){S.setAttribute(l,c),v.textContent=k})}}),n.plugins.fileHighlight={highlight:function(S){for(var v=(S||document).querySelectorAll(d),m=0,g;g=v[m++];)n.highlightElement(g)}};var y=!1;n.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(dx);var QE=dx.exports;const Sl=Vm(QE);(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism);(function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(a,u){return a=a.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(a,u)}i=o(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(a){return a?typeof a=="string"?a:typeof a.content=="string"?a.content:a.content.map(s).join(""):""},l=function(a){for(var u=[],c=0;c<a.length;c++){var d=a[c],h=!1;if(typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?u.length>0&&u[u.length-1].tagName===s(d.content[0].content[1])&&u.pop():d.content[d.content.length-1].content==="/>"||u.push({tagName:s(d.content[0].content[1]),openedBraces:0}):u.length>0&&d.type==="punctuation"&&d.content==="{"?u[u.length-1].openedBraces++:u.length>0&&u[u.length-1].openedBraces>0&&d.type==="punctuation"&&d.content==="}"?u[u.length-1].openedBraces--:h=!0),(h||typeof d=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var p=s(d);c<a.length-1&&(typeof a[c+1]=="string"||a[c+1].type==="plain-text")&&(p+=s(a[c+1]),a.splice(c+1,1)),c>0&&(typeof a[c-1]=="string"||a[c-1].type==="plain-text")&&(p=s(a[c-1])+p,a.splice(c-1,1),c--),a[c]=new e.Token("plain-text",p,null,p)}d.content&&typeof d.content!="string"&&l(d.content)}};e.hooks.add("after-tokenize",function(a){a.language!=="jsx"&&a.language!=="tsx"||l(a.tokens)})})(Prism);(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism);(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism);(function(e){function t(U,b){return U.replace(/<<(\d+)>>/g,function(Q,H){return"(?:"+b[+H]+")"})}function n(U,b,Q){return RegExp(t(U,b),"")}function r(U,b){for(var Q=0;Q<b;Q++)U=U.replace(/<<self>>/g,function(){return"(?:"+U+")"});return U.replace(/<<self>>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function o(U){return"\\b(?:"+U.trim().replace(/ /g,"|")+")\\b"}var s=o(i.typeDeclaration),l=RegExp(o(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),a=o(i.typeDeclaration+" "+i.contextual+" "+i.other),u=o(i.type+" "+i.typeDeclaration+" "+i.other),c=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),d=r(/\((?:[^()]|<<self>>)*\)/.source,2),h=/@?\b[A-Za-z_]\w*\b/.source,p=t(/<<0>>(?:\s*<<1>>)?/.source,[h,c]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[a,p]),x=/\[\s*(?:,\s*)*\]/.source,S=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,x]),v=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[c,d,x]),m=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[v]),g=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[m,y,x]),w={keyword:l,punctuation:/[<>()?,.:[\]]/},$=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,k=/"(?:\\.|[^\\"\r\n])*"/.source,_=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[_]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[k]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[h,g]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[h]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[s,p]),lookbehind:!0,inside:w},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:w},{pattern:n(/(\bwhere\s+)<<0>>/.source,[h]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[S]),lookbehind:!0,inside:w},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[g,u,h]),inside:w}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[d]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[g,y]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[g]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[h,c]),inside:{function:n(/^<<0>>/.source,[h]),generic:{pattern:RegExp(c),alias:"class-name",inside:w}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[s,p,h,g,l.source,d,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[p,d]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:l,"class-name":{pattern:RegExp(g),greedy:!0,inside:w},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var N=k+"|"+$,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[N]),E=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[D]),2),O=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,C=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,E]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[O,C]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[O]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[E]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var A=/:[^}\r\n]+/.source,R=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[D]),2),q=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,A]),B=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[N]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[B,A]);function z(U,b){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[U]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[b,A]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[q]),lookbehind:!0,greedy:!0,inside:z(q,R)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[V]),lookbehind:!0,greedy:!0,inside:z(V,B)}],char:{pattern:RegExp($),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp})(Prism);(function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby})(Prism);(function(e){function t(n,r){return"___"+n.toUpperCase()+r+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(i,function(l){if(typeof o=="function"&&!o(l))return l;for(var a=s.length,u;n.code.indexOf(u=t(r,a))!==-1;)++a;return s[a]=l,u}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language!==r||!n.tokenStack)return;n.grammar=e.languages[r];var i=0,o=Object.keys(n.tokenStack);function s(l){for(var a=0;a<l.length&&!(i>=o.length);a++){var u=l[a];if(typeof u=="string"||u.content&&typeof u.content=="string"){var c=o[i],d=n.tokenStack[c],h=typeof u=="string"?u:u.content,p=t(r,c),y=h.indexOf(p);if(y>-1){++i;var x=h.substring(0,y),S=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),v=h.substring(y+p.length),m=[];x&&m.push.apply(m,s([x])),m.push(S),v&&m.push.apply(m,s([v])),typeof u=="string"?l.splice.apply(l,[a,1].concat(m)):u.content=m}}else u.content&&s(u.content)}return l}s(n.tokens)}}})})(Prism);(function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];e.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(a){if(/<\?/.test(a.code)){var u=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(a,"php",u)}}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")})})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(l,a){a=(a||"").replace(/m/g,"")+"m";var u=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(u,a)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(o),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);(function(e){var t=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function n(r){return r.replace(/__/g,function(){return t})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(Prism);(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,s=0;s<i.length;s++)o[i[s]]=e.languages.bash[i[s]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(h){if(!(!h||typeof h=="string"))for(var p=0,y=h.length;p<y;p++){var x=h[p];if(x.type!=="code"){d(x.content);continue}var S=x.content[1],v=x.content[3];if(S&&v&&S.type==="code-language"&&v.type==="code-block"&&typeof S.content=="string"){var m=S.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var g="language-"+m;v.alias?typeof v.alias=="string"?v.alias=[v.alias,g]:v.alias.push(g):v.alias=[g]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",h=0,p=c.classes.length;h<p;h++){var y=c.classes[h],x=/language-(.+)/.exec(y);if(x){d=x[1];break}}var S=e.languages[d];if(S)c.content=e.highlight(u(c.content),S,d);else if(d&&d!=="none"&&e.plugins.autoloader){var v="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=v,e.plugins.autoloader.loadLanguages(d,function(){var m=document.getElementById(v);m&&(m.innerHTML=e.highlight(m.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,p){if(p=p.toLowerCase(),p[0]==="#"){var y;return p[1]==="x"?y=parseInt(p.slice(2),16):y=Number(p.slice(1)),a(y)}else{var x=l[p];return x||h}}),d}e.languages.md=e.languages.markdown})(Prism);Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]});Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/});Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}});Prism.languages.scss.atrule.inside.rest=Prism.languages.scss;(function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return t}),r=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return r}),o={pattern:RegExp(r),greedy:!0},s={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function l(a,u){return a=a.replace(/<OPT>/g,function(){return i}).replace(/<SP>/g,function(){return n}),RegExp(a,u)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:l(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[o,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:l(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:s,string:o,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:s},e.languages.dockerfile=e.languages.docker})(Prism);Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/};Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/};Prism.hooks.add("after-tokenize",function(t){if(t.language!=="graphql")return;var n=t.tokens.filter(function(x){return typeof x!="string"&&x.type!=="comment"&&x.type!=="scalar"}),r=0;function i(x){return n[r+x]}function o(x,S){S=S||0;for(var v=0;v<x.length;v++){var m=i(v+S);if(!m||m.type!==x[v])return!1}return!0}function s(x,S){for(var v=1,m=r;m<n.length;m++){var g=n[m],w=g.content;if(g.type==="punctuation"&&typeof w=="string"){if(x.test(w))v++;else if(S.test(w)&&(v--,v===0))return m}}return-1}function l(x,S){var v=x.alias;v?Array.isArray(v)||(x.alias=v=[v]):x.alias=v=[],v.push(S)}for(;r<n.length;){var a=n[r++];if(a.type==="keyword"&&a.content==="mutation"){var u=[];if(o(["definition-mutation","punctuation"])&&i(1).content==="("){r+=2;var c=s(/^\($/,/^\)$/);if(c===-1)continue;for(;r<c;r++){var d=i(0);d.type==="variable"&&(l(d,"variable-input"),u.push(d.content))}r=c+1}if(o(["punctuation","property-query"])&&i(0).content==="{"&&(r++,l(i(0),"property-mutation"),u.length>0)){var h=s(/^\{$/,/^\}$/);if(h===-1)continue;for(var p=r;p<h;p++){var y=n[p];y.type==="variable"&&u.indexOf(y.content)>=0&&l(y,"variable-input")}}}}});(function(e){var t=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:t}},builtin:t,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})})(Prism);Prism.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/};Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/};(function(e){var t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);const ZE={ts:"typescript",mts:"typescript",cts:"typescript",tsx:"tsx",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",go:"go",py:"python",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",swift:"swift",c:"c",h:"c",cc:"cpp",cpp:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",json:"json",jsonc:"json",yml:"yaml",yaml:"yaml",toml:"toml",sh:"bash",bash:"bash",zsh:"bash",sql:"sql",md:"markdown",mdx:"markdown",css:"css",scss:"scss",html:"markup",htm:"markup",xml:"markup",svg:"markup",vue:"markup",hcl:"hcl",tf:"hcl",graphql:"graphql",gql:"graphql",proto:"protobuf",ini:"ini",lua:"lua",dart:"dart"},zh={Dockerfile:"docker",Makefile:"makefile",GNUmakefile:"makefile",".env":"bash"};function JE(e){const t=e.split("/").pop()??"";if(zh[t])return zh[t];if(t.startsWith("Dockerfile"))return"docker";const n=t.includes(".")?t.split(".").pop().toLowerCase():"",r=ZE[n];return r&&Sl.languages[r]?r:void 0}function gf(e,t){const n=Sl.languages[t];if(!n)return e.map(s=>[{types:"",text:s}]);const r=[[]],i=(s,l)=>{l.split(`
|
|
120
|
+
`).forEach((u,c)=>{c>0&&r.push([]),u&&r[r.length-1].push({types:s,text:u})})},o=(s,l)=>{for(const a of s)if(typeof a=="string")i(l,a);else{const u=[a.type,...a.alias?Array.isArray(a.alias)?a.alias:[a.alias]:[]].join(" "),c=l?`${l} ${u}`:u;typeof a.content=="string"?i(c,a.content):o(Array.isArray(a.content)?a.content:[a.content],c)}};for(o(Sl.tokenize(e.join(`
|
|
121
|
+
`),n),"");r.length<e.length;)r.push([]);return r}const Bh=5e3,Uh=1e3;function eS(e,t){const n=JE(e.path);if(!n)return;let r=0;for(const o of e.chunks)for(const s of o.lines)if(++r>Bh||s.content.length>Uh)return;const i=new Map;for(const o of e.chunks)Hh(o,"old",n,i),Hh(o,"new",n,i);return t&&t.length<=Bh&&t.every(o=>o.length<=Uh)&&gf(t,n).forEach((o,s)=>i.set(`new:${s+1}`,o)),i}function Hh(e,t,n,r){const i=e.lines.filter(s=>s.type==="normal"||s.type===(t==="old"?"delete":"add"));if(!i.length)return;const o=gf(i.map(s=>s.content),n);i.forEach((s,l)=>r.set(`${t}:${t==="old"?s.oldLine:s.newLine}`,o[l]))}function tS(e,t){const n=t==null?void 0:t.toLowerCase();if(!(!n||!Sl.languages[n]||e.length>1e5))return gf(e.split(`
|
|
122
|
+
`),n)}function nS({file:e,version:t}){const n=e.status==="added"?["new"]:e.status==="removed"?["old"]:["old","new"];return f.jsx("div",{className:`fs-images n${n.length}`,children:n.map(r=>f.jsx(rS,{side:r,path:r==="old"?e.oldPath??e.path:e.path,version:t},r))})}function rS({side:e,path:t,version:n}){const[r,i]=T.useState(null),[o,s]=T.useState(!1);return f.jsxs("figure",{className:`fs-image ${e}`,children:[f.jsxs("figcaption",{children:[f.jsx("span",{className:`fs-image-side ${e}`,children:e==="old"?"変更前":"変更後"}),r&&f.jsx("span",{className:"ds-muted",children:r})]}),f.jsx("div",{className:"fs-image-frame",children:o?f.jsx("span",{className:"ds-muted",children:"表示できませんでした"}):f.jsx("img",{src:ux(t,e,n),alt:`${t}(${e==="old"?"変更前":"変更後"})`,onLoad:l=>i(`${l.currentTarget.naturalWidth} × ${l.currentTarget.naturalHeight}`),onError:()=>s(!0)})})]})}function iS(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const oS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lS={};function Wh(e,t){return(lS.jsx?sS:oS).test(e)}const aS=/[ \t\n\f\r]/g;function uS(e){return typeof e=="object"?e.type==="text"?Vh(e.value):!1:Vh(e)}function Vh(e){return e.replace(aS,"")===""}class Yo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Yo.prototype.normal={};Yo.prototype.property={};Yo.prototype.space=void 0;function fx(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Yo(n,r,t)}function Sc(e){return e.toLowerCase()}class Ut{constructor(t,n){this.attribute=n,this.property=t}}Ut.prototype.attribute="";Ut.prototype.booleanish=!1;Ut.prototype.boolean=!1;Ut.prototype.commaOrSpaceSeparated=!1;Ut.prototype.commaSeparated=!1;Ut.prototype.defined=!1;Ut.prototype.mustUseProperty=!1;Ut.prototype.number=!1;Ut.prototype.overloadedBoolean=!1;Ut.prototype.property="";Ut.prototype.spaceSeparated=!1;Ut.prototype.space=void 0;let cS=0;const Le=qr(),st=qr(),Cc=qr(),ue=qr(),Ve=qr(),Rr=qr(),Wt=qr();function qr(){return 2**++cS}const Nc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:st,commaOrSpaceSeparated:Wt,commaSeparated:Rr,number:ue,overloadedBoolean:Cc,spaceSeparated:Ve},Symbol.toStringTag,{value:"Module"})),Za=Object.keys(Nc);class yf extends Ut{constructor(t,n,r,i){let o=-1;if(super(t,n),qh(this,"space",i),typeof r=="number")for(;++o<Za.length;){const s=Za[o];qh(this,Za[o],(r&Nc[s])===Nc[s])}}}yf.prototype.defined=!0;function qh(e,t,n){n&&(e[t]=n)}function Mi(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new yf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Sc(r)]=r,n[Sc(o.attribute)]=r}return new Yo(t,n,e.space)}const px=Mi({properties:{ariaActiveDescendant:null,ariaAtomic:st,ariaAutoComplete:null,ariaBusy:st,ariaChecked:st,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Ve,ariaCurrent:null,ariaDescribedBy:Ve,ariaDetails:null,ariaDisabled:st,ariaDropEffect:Ve,ariaErrorMessage:null,ariaExpanded:st,ariaFlowTo:Ve,ariaGrabbed:st,ariaHasPopup:null,ariaHidden:st,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ve,ariaLevel:ue,ariaLive:null,ariaModal:st,ariaMultiLine:st,ariaMultiSelectable:st,ariaOrientation:null,ariaOwns:Ve,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:st,ariaReadOnly:st,ariaRelevant:null,ariaRequired:st,ariaRoleDescription:Ve,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:st,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hx(e,t){return t in e?e[t]:t}function mx(e,t){return hx(e,t.toLowerCase())}const dS=Mi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rr,acceptCharset:Ve,accessKey:Ve,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alpha:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:Ve,autoFocus:Le,autoPlay:Le,blocking:Ve,capture:null,charSet:null,checked:Le,cite:null,className:Ve,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:st,controls:Le,controlsList:Ve,coords:ue|Rr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:Cc,draggable:st,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:Ve,height:ue,hidden:Cc,high:ue,href:null,hrefLang:null,htmlFor:Ve,httpEquiv:Ve,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:Ve,itemRef:Ve,itemScope:Le,itemType:Ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Le,optimum:ue,pattern:null,ping:Ve,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:Ve,required:Le,reversed:Le,rows:ue,rowSpan:ue,sandbox:Ve,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootCustomElementRegistry:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shadowRootSerializable:Le,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:st,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:st,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ve,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:st,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Le,disablePictureInPicture:Le,disableRemotePlayback:Le,exportParts:Rr,part:Ve,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:mx}),fS=Mi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Wt,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Ve,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Rr,g2:Rr,glyphName:Rr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Wt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ue,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wt,rev:Wt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wt,requiredFeatures:Wt,requiredFonts:Wt,requiredFormats:Wt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Wt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wt,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hx}),gx=Mi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),yx=Mi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mx}),vx=Mi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),pS={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},hS=/[A-Z]/g,Kh=/-[a-z]/g,mS=/^data[-\w.:]+$/i;function gS(e,t){const n=Sc(t);let r=t,i=Ut;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&mS.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Kh,vS);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Kh.test(o)){let s=o.replace(hS,yS);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=yf}return new i(r,t)}function yS(e){return"-"+e.toLowerCase()}function vS(e){return e.charAt(1).toUpperCase()}const xS=fx([px,dS,gx,yx,vx],"html"),vf=fx([px,fS,gx,yx,vx],"svg");function wS(e){return e.join(" ").trim()}var Gh=/\/\*(?:[^*]|\*(?!\/))*\*\//g,kS=/\n/g,bS=/^\s*/,ES=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,SS=/^:\s*/,CS=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,NS=/^[;\s]*/,jS=`
|
|
123
|
+
`,Yh="/",Xh="*",Ki="",_S="comment",$S="declaration";function TS(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var x=y.match(kS);x&&(n+=x.length);var S=y.lastIndexOf(jS);r=~S?y.length-S:r+y.length}function o(){var y={line:n,column:r};return function(x){return x.position=new s(y),u(),x}}function s(y){this.start=y,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(y){var x=new Error(t.source+":"+n+":"+r+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function a(y){var x=y.exec(e);if(x){var S=x[0];return i(S),e=e.slice(S.length),x}}function u(){a(bS)}function c(y){for(var x;x=d();)y.push(x);return y}function d(){var y=o();if(!(Yh!=e.charAt(0)||Xh!=e.charAt(1))){for(var x=2;Ki!=e.charAt(x)&&(Xh!=e.charAt(x)||Yh!=e.charAt(x+1));)++x;if(x+=2,Ki===e.charAt(x-1))return l("End of comment missing");var S=e.slice(2,x-2);return r+=2,i(S),e=e.slice(x),r+=2,y({type:_S,comment:S})}}function h(){var y=o(),x=a(ES);if(x){if(d(),!a(SS))return l("property missing ':'");var S=a(CS),v=y({type:$S,property:x[0].replace(Gh,Ki).trim(),value:S?S[0].replace(Gh,Ki).trim():Ki});return a(NS),v}}function p(){var y=[];c(y);for(var x;x=h();)y.push(x),c(y);return y}return u(),p()}function LS(e,t){let n=null;if(!e||typeof e!="string")return n;const r=TS(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n??{},n[s]=l)}),n}const xx=wx("end"),xf=wx("start");function wx(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function IS(e){const t=xf(e),n=xx(e);if(t&&n)return{start:t,end:n}}function ho(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qh(e.position):"start"in e||"end"in e?Qh(e):"line"in e||"column"in e?jc(e):""}function jc(e){return Zh(e&&e.line)+":"+Zh(e&&e.column)}function Qh(e){return jc(e&&e.start)+"-"+jc(e&&e.end)}function Zh(e){return e&&typeof e=="number"?e:1}class Ql extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=ho(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Object.defineProperties(Ql.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const wf={}.hasOwnProperty,AS=new Map,RS=/[A-Z]/g,OS=/-([a-z])/g,MS=new Set(["table","tbody","thead","tfoot","tr"]),PS=new Set(["td","th"]),kx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function FS(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=qS(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=VS(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?vf:xS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=bx(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function bx(e,t,n){if(t.type==="element")return DS(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return zS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return US(e,t,n);if(t.type==="mdxjsEsm")return BS(e,t);if(t.type==="root")return HS(e,t,n);if(t.type==="text")return WS(e,t)}function DS(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=vf,e.schema=i),e.ancestors.push(t);const o=Sx(e,t.tagName,!1),s=KS(e,t);let l=bf(e,t);return MS.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!uS(a):!0})),Ex(e,s,o,t),kf(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function zS(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Bo(e,t.position)}function BS(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bo(e,t.position)}function US(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=vf,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Sx(e,t.name,!0),s=GS(e,t),l=bf(e,t);return Ex(e,s,o,t),kf(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function HS(e,t,n){const r={};return kf(r,bf(e,t)),e.create(t,e.Fragment,r,n)}function WS(e,t){return t.value}function Ex(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function kf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function VS(e,t,n){return r;function r(i,o,s,l){const u=Array.isArray(s.children)?n:t;return l?u(o,s,l):u(o,s)}}function qS(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=xf(r);return t(i,o,s,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function KS(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&wf.call(t.properties,i)){const o=YS(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&PS.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function GS(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Bo(e,t.position);else{const{name:i}=r;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Bo(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function bf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:AS;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const a=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(a){const u=i.get(a)||0;s=a+"-"+u,i.set(a,u+1)}}const l=bx(e,o,s);l!==void 0&&n.push(l)}return n}function YS(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=gS(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?iS(n):wS(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:QS(n):XS(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?pS[r.property]||r.property:r.attribute,n]}function XS(e,t){const n={};try{LS(t,function(r,i){if(r&&i){let o=r;o.slice(0,2)!=="--"&&(o=o.toLowerCase(),e.stylePropertyNameCase==="dom"&&(o.slice(0,4)==="-ms-"&&(o=o.slice(1)),o=o.replace(OS,eC))),n[o]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,o=new Ql("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=kx+"#cannot-parse-style-attribute",o}return n}function Sx(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=Wh(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=Wh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return wf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bo(e)}function Bo(e,t){const n=new Ql("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=kx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function QS(e){const t={};let n;for(n in e)wf.call(e,n)&&(t[ZS(n)]=e[n]);return t}function ZS(e){if(e.slice(0,2)==="--")return e;let t=e.replace(RS,JS);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function JS(e){return"-"+e.toLowerCase()}function eC(e,t){return t.toUpperCase()}const Ja={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},tC={};function Zl(e,t){const n=tC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Cx(e,r,i)}function Cx(e,t,n){if(nC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Jh(e.children,t,n)}return Array.isArray(e)?Jh(e,t,n):""}function Jh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Cx(e[i],t,n);return r.join("")}function nC(e){return!!(e&&typeof e=="object")}const em=document.createElement("i");function Ef(e){const t="&"+e+";";em.innerHTML=t;const n=em.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kn(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function sn(e,t){return e.length>0?(kn(e,e.length,0,t),e):t}const tm={}.hasOwnProperty;function Nx(e){const t={};let n=-1;for(;++n<e.length;)rC(t,e[n]);return t}function rC(e,t){let n;for(n in t){const i=(tm.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){tm.call(i,s)||(i[s]=[]);const l=o[s];iC(i[s],Array.isArray(l)?l:l?[l]:[])}}}function iC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kn(e,0,0,r)}function jx(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function bn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xt=xr(/[A-Za-z]/),wt=xr(/[\dA-Za-z]/),oC=xr(/[#-'*+\--9=?A-Z^-~]/);function Cl(e){return e!==null&&(e<32||e===127)}const _c=xr(/\d/),sC=xr(/[\dA-Fa-f]/),_x=xr(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function qe(e){return e!==null&&(e<0||e===32)}function Me(e){return e===-2||e===-1||e===32}const Xo=xr(new RegExp("\\p{P}|\\p{S}","u")),Hr=xr(/\s/);function xr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Pi(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&wt(e.charCodeAt(n+1))&&wt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ze(e,t,n,r){const i=r?r-1:1/0;let o=0;return s;function s(a){return Me(a)?(e.enter(n),l(a)):t(a)}function l(a){return Me(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}function $x(e,t,n,r,i,o){let s=0;return l;function l(c){return Me(c)?(e.enter(r),a(c)):u(c)}function a(c){return Me(c)&&s<o?(e.consume(c),s++,a):(e.exit(r),u(c))}function u(c){return s>=i?t(c):n(c)}}const lC={tokenize:aC};function aC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ze(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return $e(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}let Nl=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){nm(this,t,n,r,!1)}addBefore(t,n,r){nm(this,t,n,r,!0)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function nm(e,t,n,r,i){if(n===0&&r.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,i?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}const uC={tokenize:cC},rm={tokenize:dC};function cC(e){const t=this,n=[];let r=0,i,o,s;return l;function l(g){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,a,u)(g)}return u(g)}function a(g){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const w=t.events.length;let $=w,k;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){k=t.events[$][1].end;break}v(r);let _=w;for(;_<t.events.length;)t.events[_][1].end={...k},_++;const N=new Nl;return N.add($+1,0,t.events.slice(w)),N.add(w,_-w,[]),N.consume(t.events),u(g)}return l(g)}function u(g){if(r===n.length){if(!i)return h(g);if(i.currentConstruct&&i.currentConstruct.concrete)return y(g);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(rm,c,d)(g)}function c(g){return i&&m(),v(r),h(g)}function d(g){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,y(g)}function h(g){return t.containerState={},e.attempt(rm,p,y)(g)}function p(g){return r++,n.push([t.currentConstruct,t.containerState]),h(g)}function y(g){if(g===null){i&&m(),v(0),e.consume(g);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(g)}function x(g){if(g===null){S(e.exit("chunkFlow"),!0),v(0),e.consume(g);return}return $e(g)?(e.consume(g),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(g),x)}function S(g,w){const $=t.sliceStream(g);if(w&&$.push(null),g.previous=o,o&&(o.next=g),o=g,i.defineSkip(g.start),i.write($),t.parser.lazy[g.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<s&&(!i.events[k][1].end||i.events[k][1].end.offset>s))return;const _=t.events.length;let N=_,D,E;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(D){E=t.events[N][1].end;break}D=!0}for(v(r),k=_;k<t.events.length;)t.events[k][1].end={...E},k++;const O=new Nl;O.add(N+1,0,t.events.slice(_)),O.add(_,k-_,[]),O.consume(t.events)}}function v(g){let w=n.length;for(;w-- >g;){const $=n[w];t.containerState=$[1],$[0].exit.call(t,e)}n.length=g}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function dC(e,t,n){return ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function mr(e){if(e===null||qe(e)||Hr(e))return 1;if(Xo(e))return 2}function Jl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const $c={name:"attention",resolveAll:fC,tokenize:pC};function fC(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const o=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,s={...e[i][1].end},l={...e[n][1].start};im(s,-o),im(l,o);const a={type:o>1?"strongSequence":"emphasisSequence",start:s,end:{...e[i][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:l},c={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},d={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}};e[i][1].end={...a.start},e[n][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=sn(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=sn(r,[["enter",d,t],["enter",a,t],["exit",a,t],["enter",c,t]]),r=sn(r,Jl(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=sn(r,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",d,t]]);let h=0;e[n][1].end.offset-e[n][1].start.offset&&(h=2,r=sn(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),kn(e,i-1,n-i+3,r),n=i+r.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function pC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=mr(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=mr(a),d=!c||c===2&&i||n.includes(a)&&a!==42&&a!==95,h=!i||i===2&&c||n.includes(r)&&r!==42&&r!==95;return u._open=!!(o===42?d:d&&(i||!h)),u._close=!!(o===42?h:h&&(c||!d)),t(a)}}function im(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hC={name:"autolink",tokenize:mC};function mC(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return xt(p)?(e.consume(p),s):p===64?n(p):u(p)}function s(p){return p===43||p===45||p===46||wt(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||wt(p))&&r++<32?(e.consume(p),l):(r=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Cl(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),c):oC(p)?(e.consume(p),u):n(p)}function c(p){return wt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||wt(p))&&r++<63){const y=p===45?h:d;return e.consume(p),y}return n(p)}}const Qo={partial:!0,tokenize:gC};function gC(e,t,n){return r;function r(o){return Me(o)?ze(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||$e(o)?t(o):n(o)}}const Tx={continuation:{tokenize:vC},exit:xC,name:"blockQuote",tokenize:yC};function yC(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Me(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function vC(e,t,n){const r=this;return i;function i(s){return Me(s)?ze(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Tx,t,n)(s)}}function xC(e){e.exit("blockQuote")}const Lx={name:"characterEscape",tokenize:wC};function wC(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return _x(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ix={name:"characterReference",tokenize:kC};function kC(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=wt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=sC,c):(e.enter("characterReferenceValue"),o=7,s=_c,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return s===wt&&!Ef(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),c):n(d)}}const Tc={partial:!0,tokenize:bC};function bC(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const om={concrete:!0,name:"codeFenced",tokenize:EC};function EC(e,t,n){const r=this,i={partial:!0,tokenize:$};let o=0,s=0,l;return a;function a(k){return u(k)}function u(k){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,l=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(k)}function c(k){return k===l?(s++,e.consume(k),c):s<3?n(k):(e.exit("codeFencedFenceSequence"),Me(k)?ze(e,d,"whitespace")(k):d(k))}function d(k){return k===null||$e(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Tc,x,w)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===null||$e(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(k)):Me(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ze(e,p,"whitespace")(k)):k===96&&k===l?n(k):(e.consume(k),h)}function p(k){return k===null||$e(k)?d(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===null||$e(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(k)):k===96&&k===l?n(k):(e.consume(k),y)}function x(k){return e.attempt(i,w,S)(k)}function S(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),v}function v(k){return o>0&&Me(k)?ze(e,m,"linePrefix",o+1)(k):m(k)}function m(k){return k===null||$e(k)?e.check(Tc,x,w)(k):(e.enter("codeFlowValue"),g(k))}function g(k){return k===null||$e(k)?(e.exit("codeFlowValue"),m(k)):(e.consume(k),g)}function w(k){return e.exit("codeFenced"),t(k)}function $(k,_,N){let D=0;return E;function E(q){return k.enter("lineEnding"),k.consume(q),k.exit("lineEnding"),O}function O(q){return k.enter("codeFencedFence"),Me(q)?ze(k,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):C(q)}function C(q){return q===l?(k.enter("codeFencedFenceSequence"),A(q)):N(q)}function A(q){return q===l?(D++,k.consume(q),A):D>=s?(k.exit("codeFencedFenceSequence"),Me(q)?ze(k,R,"whitespace")(q):R(q)):N(q)}function R(q){return q===null||$e(q)?(k.exit("codeFencedFence"),_(q)):N(q)}}}const eu={name:"codeIndented",tokenize:CC},SC={partial:!0,tokenize:NC};function CC(e,t,n){return r;function r(l){return e.enter("codeIndented"),$x(e,i,n,"linePrefix",4,4)(l)}function i(l){return l===null?s(l):$e(l)?e.attempt(SC,i,s)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||$e(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),o)}function s(l){return e.exit("codeIndented"),t(l)}}function NC(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):$e(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):$x(e,t,o,"linePrefix",4,4)(s)}function o(s){return $e(s)?i(s):n(s)}}const jC={name:"codeText",previous:$C,resolve:_C,tokenize:TC};function _C(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function $C(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function TC(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):$e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||$e(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class LC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Gi(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Gi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Gi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Gi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Gi(this.left,n.reverse())}}}function Gi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ax(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new LC(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,IC(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return kn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function IC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,a=[],u={};let c,d,h=-1,p=n,y=0,x=0;const S=[x];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(x=h+1,S.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const v=l.slice(S[h],S[h+1]),m=o.pop();a.push([m,m+v.length-1]),e.splice(m,2,v)}for(a.reverse(),h=-1;++h<a.length;)u[y+a[h][0]]=y+a[h][1],y+=a[h][1]-a[h][0]-1;return u}const AC={resolve:OC,tokenize:MC},RC={partial:!0,tokenize:PC};function OC(e){return Ax(e),e}function MC(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):$e(l)?e.check(RC,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function PC(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ze(e,o,"linePrefix")}function o(s){if(s===null||$e(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Rx(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(v){return v===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(v),e.exit(o),h):v===null||v===32||v===41||Cl(v)?n(v):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(v))}function h(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(l),h(v)):v===null||v===60||$e(v)?n(v):(e.consume(v),v===92?y:p)}function y(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function x(v){return!c&&(v===null||v===41||qe(v))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(v)):c<u&&v===40?(e.consume(v),c++,x):v===41?(e.consume(v),c--,x):v===null||v===32||v===40||Cl(v)?n(v):(e.consume(v),v===92?S:x)}function S(v){return v===40||v===41||v===92?(e.consume(v),x):x(v)}}function Ox(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return l>999||p===null||p===91||p===93&&!a||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||$e(p)||l++>999?(e.exit("chunkString"),c(p)):(e.consume(p),a||(a=!Me(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function Mx(e,t,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,a):n(h)}function a(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===s?(e.exit(o),a(s)):h===null?n(h):$e(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ze(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||$e(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===s||h===92?(e.consume(h),c):c(h)}}function mo(e,t){let n;return r;function r(i){return $e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Me(i)?ze(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const FC={name:"definition",tokenize:zC},DC={partial:!0,tokenize:BC};function zC(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return Ox.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return qe(p)?mo(e,u)(p):u(p)}function u(p){return Rx(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(DC,d,d)(p)}function d(p){return Me(p)?ze(e,h,"whitespace")(p):h(p)}function h(p){return p===null||$e(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function BC(e,t,n){return r;function r(l){return qe(l)?mo(e,i)(l):n(l)}function i(l){return Mx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return Me(l)?ze(e,s,"whitespace")(l):s(l)}function s(l){return l===null||$e(l)?t(l):n(l)}}const UC={name:"hardBreakEscape",tokenize:HC};function HC(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return $e(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const WC={name:"headingAtx",resolve:VC,tokenize:qC};function VC(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};kn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e}function qC(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||qe(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||$e(c)?(e.exit("atxHeading"),t(c)):Me(c)?ze(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||qe(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const Px=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Lc=["pre","script","style","textarea"],KC={concrete:!0,name:"htmlFlow",resolveTo:YC,tokenize:XC},GC={partial:!0,tokenize:QC};function YC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function XC(e,t,n){const r=this;let i,o,s,l,a;return u;function u(j){return c(j)}function c(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),d}function d(j){return j===33?(e.consume(j),h):j===47?(e.consume(j),o=!0,x):j===63?(e.consume(j),i=3,r.interrupt?t:b):xt(j)?(e.consume(j),s=String.fromCharCode(j),S):n(j)}function h(j){return j===45?(e.consume(j),i=2,p):j===91?(e.consume(j),i=5,l=0,y):xt(j)?(e.consume(j),i=4,r.interrupt?t:b):n(j)}function p(j){return j===45?(e.consume(j),r.interrupt?t:b):n(j)}function y(j){const P="CDATA[";return j===P.charCodeAt(l++)?(e.consume(j),l===P.length?r.interrupt?t:C:y):n(j)}function x(j){return xt(j)?(e.consume(j),s=String.fromCharCode(j),S):n(j)}function S(j){if(j===null||j===47||j===62||qe(j)){const P=j===47,L=s.toLowerCase();return!P&&!o&&Lc.includes(L)?(i=1,r.interrupt?t(j):C(j)):Px.includes(s.toLowerCase())?(i=6,P?(e.consume(j),v):r.interrupt?t(j):C(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):o?m(j):g(j))}return j===45||wt(j)?(e.consume(j),s+=String.fromCharCode(j),S):n(j)}function v(j){return j===62?(e.consume(j),r.interrupt?t:C):n(j)}function m(j){return Me(j)?(e.consume(j),m):E(j)}function g(j){return j===47?(e.consume(j),E):j===58||j===95||xt(j)?(e.consume(j),w):Me(j)?(e.consume(j),g):E(j)}function w(j){return j===45||j===46||j===58||j===95||wt(j)?(e.consume(j),w):$(j)}function $(j){return j===61?(e.consume(j),k):Me(j)?(e.consume(j),$):g(j)}function k(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),a=j,_):Me(j)?(e.consume(j),k):N(j)}function _(j){return j===a?(e.consume(j),a=null,D):j===null||$e(j)?n(j):(e.consume(j),_)}function N(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||qe(j)?$(j):(e.consume(j),N)}function D(j){return j===47||j===62||Me(j)?g(j):n(j)}function E(j){return j===62?(e.consume(j),O):n(j)}function O(j){return j===null||$e(j)?C(j):Me(j)?(e.consume(j),O):n(j)}function C(j){return j===45&&i===2?(e.consume(j),B):j===60&&i===1?(e.consume(j),V):j===62&&i===4?(e.consume(j),Q):j===63&&i===3?(e.consume(j),b):j===93&&i===5?(e.consume(j),U):$e(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(GC,H,A)(j)):j===null||$e(j)?(e.exit("htmlFlowData"),A(j)):(e.consume(j),C)}function A(j){return e.check(Tc,R,H)(j)}function R(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),q}function q(j){return j===null||$e(j)?A(j):(e.enter("htmlFlowData"),C(j))}function B(j){return j===45?(e.consume(j),b):C(j)}function V(j){return j===47?(e.consume(j),s="",z):C(j)}function z(j){if(j===62){const P=s.toLowerCase();return Lc.includes(P)?(e.consume(j),Q):C(j)}return xt(j)&&s.length<8?(e.consume(j),s+=String.fromCharCode(j),z):C(j)}function U(j){return j===93?(e.consume(j),b):C(j)}function b(j){return j===62?(e.consume(j),Q):j===45&&i===2?(e.consume(j),b):C(j)}function Q(j){return j===null||$e(j)?(e.exit("htmlFlowData"),H(j)):(e.consume(j),Q)}function H(j){return e.exit("htmlFlow"),t(j)}}function QC(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qo,t,n)}}const ZC={name:"htmlText",tokenize:JC};function JC(e,t,n){const r=this;let i,o,s;return l;function l(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),a}function a(b){return b===33?(e.consume(b),u):b===47?(e.consume(b),$):b===63?(e.consume(b),g):xt(b)?(e.consume(b),N):n(b)}function u(b){return b===45?(e.consume(b),c):b===91?(e.consume(b),o=0,y):xt(b)?(e.consume(b),m):n(b)}function c(b){return b===45?(e.consume(b),p):n(b)}function d(b){return b===null?n(b):b===45?(e.consume(b),h):$e(b)?(s=d,V(b)):(e.consume(b),d)}function h(b){return b===45?(e.consume(b),p):d(b)}function p(b){return b===62?B(b):b===45?h(b):d(b)}function y(b){const Q="CDATA[";return b===Q.charCodeAt(o++)?(e.consume(b),o===Q.length?x:y):n(b)}function x(b){return b===null?n(b):b===93?(e.consume(b),S):$e(b)?(s=x,V(b)):(e.consume(b),x)}function S(b){return b===93?(e.consume(b),v):x(b)}function v(b){return b===62?B(b):b===93?(e.consume(b),v):x(b)}function m(b){return b===null||b===62?B(b):$e(b)?(s=m,V(b)):(e.consume(b),m)}function g(b){return b===null?n(b):b===63?(e.consume(b),w):$e(b)?(s=g,V(b)):(e.consume(b),g)}function w(b){return b===62?B(b):g(b)}function $(b){return xt(b)?(e.consume(b),k):n(b)}function k(b){return b===45||wt(b)?(e.consume(b),k):_(b)}function _(b){return $e(b)?(s=_,V(b)):Me(b)?(e.consume(b),_):B(b)}function N(b){return b===45||wt(b)?(e.consume(b),N):b===47||b===62||qe(b)?D(b):n(b)}function D(b){return b===47?(e.consume(b),B):b===58||b===95||xt(b)?(e.consume(b),E):$e(b)?(s=D,V(b)):Me(b)?(e.consume(b),D):B(b)}function E(b){return b===45||b===46||b===58||b===95||wt(b)?(e.consume(b),E):O(b)}function O(b){return b===61?(e.consume(b),C):$e(b)?(s=O,V(b)):Me(b)?(e.consume(b),O):D(b)}function C(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,A):$e(b)?(s=C,V(b)):Me(b)?(e.consume(b),C):(e.consume(b),R)}function A(b){return b===i?(e.consume(b),i=void 0,q):b===null?n(b):$e(b)?(s=A,V(b)):(e.consume(b),A)}function R(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||qe(b)?D(b):(e.consume(b),R)}function q(b){return b===47||b===62||qe(b)?D(b):n(b)}function B(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function V(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),z}function z(b){return Me(b)?ze(e,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):U(b)}function U(b){return e.enter("htmlTextData"),s(b)}}const Sf={name:"labelEnd",resolveAll:rN,resolveTo:iN,tokenize:oN},eN={tokenize:sN},tN={tokenize:lN},nN={tokenize:aN};function rN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&kn(e,0,e.length,n),e}function iN(e,t){let n=e.length,r=0,i,o,s;for(;n--;){const c=e[n][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[n][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=n,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(o=n)}const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",a,t]],s=sn(s,e.slice(i+1,i+r+3)),s=sn(s,[["enter",u,t]]),s=sn(s,Jl(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=sn(s,[["exit",u,t],e[o-2],e[o-1],["exit",a,t]]),s=sn(s,e.slice(o+1)),s=sn(s,[["exit",l,t]]),kn(e,i,e.length,s),e}function oN(e,t,n){const r=this,i=r._labelStarts;let o,s;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return l;function l(h){return o?o._inactive?d(h):(s=r.parser.defined.includes(bn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(eN,c,s?c:d)(h):h===91?e.attempt(tN,c,s?u:d)(h):s?c(h):d(h)}function u(h){return e.attempt(nN,c,d)(h)}function c(h){return i.pop(),t(h)}function d(h){return o._balanced=!0,n(h)}}function sN(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return qe(d)?mo(e,o)(d):o(d)}function o(d){return d===41?c(d):Rx(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return qe(d)?mo(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?Mx(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return qe(d)?mo(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function lN(e,t,n){const r=this;return i;function i(l){return Ox.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function aN(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const uN={name:"labelStartImage",resolveAll:Sf.resolveAll,tokenize:cN};function cN(e,t,n){const r=this;let i;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(a))}}const dN={name:"labelStartLink",resolveAll:Sf.resolveAll,tokenize:fN};function fN(e,t,n){const r=this;let i;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(l))}}const tu={name:"lineEnding",tokenize:pN};function pN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ze(e,t,"linePrefix")}}const Ws={name:"thematicBreak",tokenize:hN};function hN(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||$e(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),Me(u)?ze(e,l,"whitespace")(u):l(u))}}const Mt={continuation:{tokenize:vN},exit:wN,name:"list",tokenize:yN},mN={partial:!0,tokenize:kN},gN={partial:!0,tokenize:xN};function yN(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:_c(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ws,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return _c(p)&&++s<10?(e.consume(p),a):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qo,r.interrupt?n:c,e.attempt(mN,h,d))}function c(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function d(p){return Me(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function vN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Qo,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ze(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!Me(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gN,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ze(e,e.attempt(Mt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function xN(e,t,n){const r=this;return ze(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function wN(e){e.exit(this.containerState.type)}function kN(e,t,n){const r=this;return ze(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Me(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const sm={name:"setextUnderline",resolveTo:bN,tokenize:EN};function bN(e,t){const n=new Nl;let r=e.length,i,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!s&&e[r][1].type==="definition"&&(s=r);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(n.add(o,0,[["enter",l,t]]),n.add(s+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[s][1].end}):e[i][1]=l,n.add(e.length,0,[["exit",l,t]]),n.consume(e),e}function EN(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Me(u)?ze(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||$e(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const SN={tokenize:CN};function CN(e){const t=this,n=e.attempt(Qo,r,e.attempt(this.parser.constructs.flowInitial,i,ze(e,e.attempt(this.parser.constructs.flow,i,e.attempt(AC,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const NN={resolveAll:Dx()},jN=Fx("string"),_N=Fx("text");function Fx(e){return{resolveAll:Dx(e==="text"?$N:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=i[c];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Dx(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function $N(e,t){const n=new Nl;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],o=t.sliceStream(i);let s=o.length,l=-1,a=0,u;for(;s--;){const c=o[s];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(c===-2)u=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(a=0),a){const c={type:r===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):n.add(r,0,[["enter",c,t],["exit",c,t]])}r++}return n.consume(e),e}const TN={42:Mt,43:Mt,45:Mt,48:Mt,49:Mt,50:Mt,51:Mt,52:Mt,53:Mt,54:Mt,55:Mt,56:Mt,57:Mt,62:Tx},LN={91:FC},IN={[-2]:eu,[-1]:eu,32:eu},AN={35:WC,42:Ws,45:[sm,Ws],60:KC,61:sm,95:Ws,96:om,126:om},RN={38:Ix,92:Lx},ON={[-5]:tu,[-4]:tu,[-3]:tu,33:uN,38:Ix,42:$c,60:[hC,ZC],91:dN,92:[UC,Lx],93:Sf,95:$c,96:jC},MN={null:[$c,NN]},PN={null:[42,95]},FN={null:[]},DN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:PN,contentInitial:LN,disable:FN,document:TN,flow:AN,flowInitial:IN,insideSpan:MN,string:RN,text:ON},Symbol.toStringTag,{value:"Module"}));function zN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:_($),check:_(k),consume:m,enter:g,exit:w,interrupt:_(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(O){return s=sn(s,O),S(),s[s.length-1]!==null?[]:(N(t,0),u.events=Jl(o,u.events,u),u.events)}function h(O,C){return UN(p(O),C)}function p(O){return BN(s,O)}function y(){const{_bufferIndex:O,_index:C,line:A,column:R,offset:q}=r;return{_bufferIndex:O,_index:C,line:A,column:R,offset:q}}function x(O){i[O.line]=O.column,E()}function S(){for(;r._index<s.length;){const O=s[r._index];if(typeof O=="string"){const C=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===C&&r._bufferIndex<O.length;)v(O.charCodeAt(r._bufferIndex))}else v(O)}}function v(O){c=c(O)}function m(O){$e(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,E()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=O}function g(O,C){const A=C||{};return A.type=O,A.start=y(),u.events.push(["enter",A,u]),l.push(A),A}function w(O){const C=l.pop();return C.end=y(),u.events.push(["exit",C,u]),C}function $(O,C){N(O,C.from)}function k(O,C){C.restore()}function _(O,C){return A;function A(R,q,B){let V,z,U,b;return Array.isArray(R)?H(R):"tokenize"in R?H([R]):Q(R);function Q(F){return K;function K(Z){const te=Z!==null&&F[Z],ie=Z!==null&&F.null,de=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return H(de)(Z)}}function H(F){return V=F,z=0,F.length===0?B:j(F[z])}function j(F){return K;function K(Z){return b=D(),U=F,F.partial||(u.currentConstruct=F),F.name&&u.parser.constructs.disable.null.includes(F.name)?L():F.tokenize.call(C?Object.assign(Object.create(u),C):u,a,P,L)(Z)}}function P(F){return O(U,b),q}function L(F){return b.restore(),++z<V.length?j(V[z]):B}}}function N(O,C){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&kn(u.events,C,u.events.length-C,O.resolve(u.events.slice(C),u)),O.resolveTo&&(u.events=O.resolveTo(u.events,u))}function D(){const O=y(),C=u.previous,A=u.currentConstruct,R=u.events.length,q=Array.from(l);return{from:R,restore:B};function B(){r=O,u.previous=C,u.currentConstruct=A,u.events.length=R,l=q,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function BN(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function UN(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
124
|
+
`;break}case-3:{s=`\r
|
|
125
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function HN(e){const r={constructs:Nx([DN,...(e||{}).extensions||[]]),content:i(lC),defined:[],document:i(uC),flow:i(SN),lazy:{},string:i(jN),text:i(_N)};return r;function i(o){return s;function s(l){return zN(r,o,l)}}}function WN(e){for(;!Ax(e););return e}const lm=/[\0\t\n\r]/g;function VN(){let e=1,t="",n=!0,r;return i;function i(o,s,l){o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o));const a=[];let u=0;for(t="",n&&(o.charCodeAt(0)===65279&&u++,n=void 0);u<o.length;){lm.lastIndex=u;const c=lm.exec(o),d=c&&c.index!==void 0?c.index:o.length,h=o.charCodeAt(d);if(!c){t=o.slice(u);break}if(h===10&&u===d&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),u<d&&(a.push(o.slice(u,d)),e+=d-u),h){case 0:{a.push(65533),e++;break}case 9:{const p=Math.ceil(e/4)*4;for(a.push(-2);e++<p;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const qN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function KN(e){return e.replace(qN,GN)}function GN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return jx(n.slice(o?2:1),o?16:10)}return Ef(n)||e}const zx={}.hasOwnProperty;function YN(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),XN(n)(WN(HN(n).document().write(VN()(e,t,!0))))}function XN(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(he),autolinkProtocol:E,autolinkEmail:E,atxHeading:s(ce),blockQuote:s(de),characterEscape:E,characterReference:E,codeFenced:s(_e),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(_e,l),codeText:s(fe,l),codeTextData:E,data:E,codeFlowValue:E,definition:s(ye),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Te),hardBreakEscape:s(M),hardBreakTrailing:s(M),htmlFlow:s(J,l),htmlFlowData:E,htmlText:s(J,l),htmlTextData:E,image:s(ee),label:l,link:s(he),listItem:s(xe),listItemValue:p,listOrdered:s(ge,h),listUnordered:s(ge),paragraph:s(Oe),reference:P,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(ce),strong:s(ot),thematicBreak:s(pe)},exit:{atxHeading:u(),atxHeadingSequence:k,autolink:u(),autolinkEmail:ie,autolinkProtocol:te,blockQuote:u(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:F,characterReferenceMarkerNumeric:F,characterReferenceValue:K,characterReference:Z,codeFenced:u(v),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:O,codeIndented:u(m),codeText:u(B),codeTextData:O,data:O,definition:u(),definitionDestinationString:$,definitionLabelString:g,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(A),hardBreakTrailing:u(A),htmlFlow:u(R),htmlFlowData:O,htmlText:u(q),htmlTextData:O,image:u(z),label:b,labelText:U,lineEnding:C,link:u(V),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:L,resourceDestinationString:Q,resourceTitleString:H,resource:j,setextHeading:u(D),setextHeadingLineSequence:N,setextHeadingText:_,strong:u(),thematicBreak:u()}};Bx(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let ne={type:"root",children:[],position:void 0};const me={stack:[ne],tokenStack:[],config:t,enter:a,exit:c,buffer:l,resume:d,data:n},ve=[],Qe=[];let Ae=-1;for(;++Ae<W.length;)if(Qe.push(W[Ae]),W[Ae][1].type==="listOrdered"||W[Ae][1].type==="listUnordered")if(W[Ae][0]==="enter")ve.push(Qe.length-1);else{const Ke=ve.pop();o(Qe,Ke)}for(W=Qe,Ae=-1;++Ae<W.length;){const Ke=t[W[Ae][0]];W[Ae][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...me,sliceSerialize:W[Ae][2].sliceSerialize},W[Ae][1]),zx.call(Ke,W[Ae][1].type)&&Ke[W[Ae][1].type].call({...me,sliceSerialize:W[Ae][2].sliceSerialize},W[Ae][1]),W[Ae][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...me,sliceSerialize:W[Ae][2].sliceSerialize},W[Ae][1])}if(me.tokenStack.length>0){const Ke=me.tokenStack[me.tokenStack.length-1];(Ke[1]||am).call(me,void 0,Ke[0])}for(ne.position={start:Yn(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:Yn(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},Ae=-1;++Ae<t.transforms.length;)ne=t.transforms[Ae](ne)||ne;return ne}function i(W,ne,me){let ve=-1;for(;++ve<W.length;)W[ve].call(ne,me)}function o(W,ne){const me=W.length-1;let ve=ne-1,Qe=-1,Ae=!1,Ke,ft,Ot,Zt;const Ht=[];for(;++ve<=me;){const ae=W[ve];switch(ae[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ae[0]==="enter"?Qe++:Qe--,Zt=void 0;break}case"lineEndingBlank":{ae[0]==="enter"&&(Ke&&!Zt&&!Qe&&!Ot&&(Ot=ve),Zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zt=void 0}if(!Qe&&ae[0]==="enter"&&ae[1].type==="listItemPrefix"||Qe===-1&&ae[0]==="exit"&&(ae[1].type==="listUnordered"||ae[1].type==="listOrdered")){if(Ke){let Se=ve;for(ft=void 0;Se--;){const Ce=W[Se];if(Ce[1].type==="lineEnding"||Ce[1].type==="lineEndingBlank"){if(Ce[0]==="exit")continue;ft&&(W[ft][1].type="lineEndingBlank",Ae=!0),Ce[1].type="lineEnding",ft=Se}else if(!(Ce[1].type==="linePrefix"||Ce[1].type==="blockQuotePrefix"||Ce[1].type==="blockQuotePrefixWhitespace"||Ce[1].type==="blockQuoteMarker"||Ce[1].type==="listItemIndent"))break}Ot&&(!ft||Ot<ft)&&(Ke._spread=!0),Ke.end=Object.assign({},ft?W[ft][1].start:ae[1].end),Ht.push({at:ft||ve,event:["exit",Ke,ae[2]]})}if(ae[1].type==="listItemPrefix"){const Se={type:"listItem",_spread:!1,start:Object.assign({},ae[1].start),end:void 0};Ke=Se,Ht.push({at:ve,event:["enter",Se,ae[2]]}),Ot=void 0,Zt=!0}}}const Tt=W.splice(ne);let Y=0;for(ve=-1;++ve<Tt.length;){for(;Y<Ht.length&&Ht[Y].at===ne+ve;)W.push(Ht[Y++].event);W.push(Tt[ve])}W[ne][1]._spread=Ae}function s(W,ne){return me;function me(ve){a.call(this,W(ve),ve),ne&&ne.call(this,ve)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(W,ne,me){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([ne,me||void 0]),W.position={start:Yn(ne.start),end:void 0}}function u(W){return ne;function ne(me){W&&W.call(this,me),c.call(this,me)}}function c(W,ne){const me=this.stack.pop(),ve=this.tokenStack.pop();if(!ve)throw new Error("Cannot close `"+W.type+"` ("+ho({start:W.start,end:W.end})+"): it’s not open");ve[0].type!==W.type&&(ne?ne.call(this,W,ve[0]):(ve[1]||am).call(this,W,ve[0])),me.position.end=Yn(W.end)}function d(){return Zl(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(W){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function y(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=W}function x(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=W}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W.replace(/(\r?\n|\r)$/g,"")}function g(W){const ne=this.resume(),me=this.stack[this.stack.length-1];me.label=ne,me.identifier=bn(this.sliceSerialize(W)).toLowerCase()}function w(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.title=W}function $(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.url=W}function k(W){const ne=this.stack[this.stack.length-1];if(!ne.depth){const me=this.sliceSerialize(W).length;ne.depth=me}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function N(W){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function E(W){const me=this.stack[this.stack.length-1].children;let ve=me[me.length-1];(!ve||ve.type!=="text")&&(ve=X(),ve.position={start:Yn(W.start),end:void 0},me.push(ve)),this.stack.push(ve)}function O(W){const ne=this.stack.pop();ne.value+=this.sliceSerialize(W),ne.position.end=Yn(W.end)}function C(W){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const me=ne.children[ne.children.length-1];me.position.end=Yn(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(E.call(this,W),O.call(this,W))}function A(){this.data.atHardBreak=!0}function R(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function q(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function B(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function V(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ne,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function z(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ne,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function U(W){const ne=this.sliceSerialize(W),me=this.stack[this.stack.length-2];me.label=KN(ne),me.identifier=bn(ne).toLowerCase()}function b(){const W=this.stack[this.stack.length-1],ne=this.resume(),me=this.stack[this.stack.length-1];if(this.data.inReference=!0,me.type==="link"){const ve=W.children;me.children=ve}else me.alt=ne}function Q(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.url=W}function H(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.title=W}function j(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function L(W){const ne=this.resume(),me=this.stack[this.stack.length-1];me.label=ne,me.identifier=bn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function F(W){this.data.characterReferenceType=W.type}function K(W){const ne=this.sliceSerialize(W),me=this.data.characterReferenceType;let ve;me?(ve=jx(ne,me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=Ef(ne);const Qe=this.stack[this.stack.length-1];Qe.value+=ve}function Z(W){const ne=this.stack.pop();ne.position.end=Yn(W.end)}function te(W){O.call(this,W);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(W)}function ie(W){O.call(this,W);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(W)}function de(){return{type:"blockquote",children:[],position:void 0}}function _e(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function fe(){return{type:"inlineCode",value:"",position:void 0}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Te(){return{type:"emphasis",children:[],position:void 0}}function ce(){return{type:"heading",depth:0,children:[],position:void 0}}function M(){return{type:"break",position:void 0}}function J(){return{type:"html",value:"",position:void 0}}function ee(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function he(){return{type:"link",title:null,url:"",children:[],position:void 0}}function ge(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[],position:void 0}}function xe(W){return{type:"listItem",spread:W._spread,checked:null,children:[],position:void 0}}function Oe(){return{type:"paragraph",children:[],position:void 0}}function ot(){return{type:"strong",children:[],position:void 0}}function X(){return{type:"text",value:"",position:void 0}}function pe(){return{type:"thematicBreak",position:void 0}}}function Yn(e){return{line:e.line,column:e.column,offset:e.offset}}function Bx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Bx(e,r):QN(e,r)}}function QN(e,t){let n;for(n in t)if(zx.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function am(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ho({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ho({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ho({start:t.start,end:t.end})+") is still open")}function ZN(e){const t=this;t.parser=n;function n(r){return YN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function JN(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ej(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
126
|
+
`}]}function tj(e,t){const n=t.value?t.value+`
|
|
127
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function nj(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rj(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ij(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Pi(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function oj(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sj(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ux(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function lj(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ux(e,t);const i={src:Pi(r.url||"")};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function aj(e,t){const n={src:Pi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function uj(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function cj(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ux(e,t);const i={href:Pi(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function dj(e,t){const n={href:Pi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fj(e,t,n){const r=e.all(t),i=n?pj(n):Hx(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const c=r[l];(i||l!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
128
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&s.push({type:"text",value:`
|
|
129
|
+
`});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function pj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const{children:n}=e;let r=-1;for(;!t&&++r<n.length;)t=Hx(n[r])}return t}function Hx(e){const{spread:t}=e;return t??e.children.length>1}function hj(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function mj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function yj(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vj(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=xf(t.children[1]),a=xx(t.children[t.children.length-1]);l&&a&&(s.position={start:l,end:a}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function xj(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let a=-1;const u=[];for(;++a<l;){const d=t.children[a],h={},p=s?s[a]:void 0;p&&(h.align=p);let y={type:"element",tagName:o,properties:h,children:[]};d&&(y.children=e.all(d),e.patch(d,y),y=e.applyData(d,y)),u.push(y)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function wj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const um=9,cm=32;function kj(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(dm(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(dm(t.slice(i),i>0,!1)),o.join("")}function dm(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===um||o===cm;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===um||o===cm;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function bj(e,t){const n={type:"text",value:kj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ej(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Sj={blockquote:JN,break:ej,code:tj,delete:nj,emphasis:rj,footnoteReference:ij,heading:oj,html:sj,imageReference:lj,image:aj,inlineCode:uj,linkReference:cj,link:dj,listItem:fj,list:hj,paragraph:mj,root:gj,strong:yj,table:vj,tableCell:wj,tableRow:xj,text:bj,thematicBreak:Ej,toml:Ss,yaml:Ss,definition:Ss,footnoteDefinition:Ss};function Ss(){}const Wx=-1,ea=0,go=1,jl=2,Cf=3,Nf=4,jf=5,_f=6,Vx=7,qx=8,{defineProperty:Cj}=Object,Kx=typeof self=="object"?self:globalThis,fm=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Kx[e](t)},Nj=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case ea:case Wx:return n(s,i);case go:{const l=n([],i);for(const a of s)l.push(r(a));return l}case jl:{const l=n({},i);for(const[a,u]of s){const c=r(a),d=r(u);c==="__proto__"?Cj(l,c,{value:d,configurable:!0,enumerable:!0,writable:!0}):l[c]=d}return l}case Cf:return n(new Date(s),i);case Nf:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case jf:{const l=n(new Map,i);for(const[a,u]of s)l.set(r(a),r(u));return l}case _f:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case Vx:{const{name:l,message:a}=s;return n(typeof Kx[l]=="function"?fm(l,a):new Error(a),i)}case qx:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}case"-0":return-0}return n(fm(o,s),i)};return r},pm=e=>Nj(new Map,e)(0),Er="",{toString:jj}={},{keys:_j,is:$j}=Object,Yi=e=>{const t=typeof e;if(t!=="object"||!e)return[ea,t];const n=jj.call(e).slice(8,-1);switch(n){case"Array":return[go,Er];case"Object":return[jl,Er];case"Date":return[Cf,Er];case"RegExp":return[Nf,Er];case"Map":return[jf,Er];case"Set":return[_f,Er];case"DataView":return[go,n]}return n.includes("Array")?[go,n]:e instanceof Error?[Vx,e.name||"Error"]:[jl,n]},Cs=([e,t])=>e===ea&&(t==="function"||t==="symbol"),Tj=(e,t,n,r)=>{const i=(s,l)=>{const a=r.push(s)-1;return n.set(l,a),a},o=s=>{if(n.has(s))return n.get(s);let[l,a]=Yi(s);switch(l){case ea:{let c=s;switch(a){case"bigint":l=qx,c=s.toString();break;case"number":if(!s&&$j(s,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);c=null;break;case"undefined":return i([Wx],s)}return i([l,c],s)}case go:{if(a){let h=s;return a==="DataView"?h=new Uint8Array(s.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(s)),i([a,[...h]],s)}const c=[],d=i([l,c],s);for(const h of s)c.push(o(h));return d}case jl:{if(a)switch(a){case"BigInt":return i([a,s.toString()],s);case"Boolean":case"Number":case"String":return i([a,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],d=i([l,c],s);for(const h of _j(s))(e||!Cs(Yi(s[h])))&&c.push([o(h),o(s[h])]);return d}case Cf:return i([l,isNaN(s.getTime())?Er:s.toISOString()],s);case Nf:{const{source:c,flags:d}=s;return i([l,{source:c,flags:d}],s)}case jf:{const c=[],d=i([l,c],s);for(const[h,p]of s)(e||!(Cs(Yi(h))||Cs(Yi(p))))&&c.push([o(h),o(p)]);return d}case _f:{const c=[],d=i([l,c],s);for(const h of s)(e||!Cs(Yi(h)))&&c.push(o(h));return d}}const{message:u}=s;return i([l,{name:a,message:u}],s)};return o},hm=(e,{json:t,lossy:n}={})=>{const r=[];return Tj(!(t||n),!!t,new Map,r)(e),r},_l=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pm(hm(e,t)):structuredClone(e):(e,t)=>pm(hm(e,t));function Lj(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ij(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Aj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Lj,r=e.options.footnoteBackLabel||Ij,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);c&&(l[u]=e.all(c))}for(u=-1;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=l[u],h=String(c.identifier).toUpperCase(),p=Pi(h.toLowerCase());let y=0;const x=[],S=e.footnoteCounts.get(h);for(;S!==void 0&&++y<=S;){x.length>0&&x.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,y);typeof g=="string"&&(g={type:"text",value:g}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,y),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const g=v.children[v.children.length-1];g&&g.type==="text"?g.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else d.push(...x);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{..._l(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
130
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
131
|
+
`}]}}const ta=function(e){if(e==null)return Pj;if(typeof e=="function")return na(e);if(typeof e=="object")return Array.isArray(e)?Rj(e):Oj(e);if(typeof e=="string")return Mj(e);throw new Error("Expected function, string, or object as test")};function Rj(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ta(e[n]);return na(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Oj(e){const t=e;return na(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Mj(e){return na(t);function t(n){return n&&n.type===e}}function na(e){return t;function t(n,r,i){return!!(Fj(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Pj(){return!0}function Fj(e){return e!==null&&typeof e=="object"&&"type"in e}const Gx=[],Dj=!0,yo=!1,Ic="skip";function Ac(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,o,s,l,a;if(typeof n=="function"||n&&typeof n=="object"?(o=t,s=n,r&&(i=!1)):(s=t,n&&(i=!1)),typeof s=="function")l=s;else if(s&&typeof s=="object"){if(!(s.enter===null||s.enter===void 0))if(typeof s.enter=="function")l=s.enter;else throw new Error("Unexpected value `"+s.enter+"` for `visitors.enter`, expected optional visitor");if(typeof s.exit=="function")a=s.exit;else throw new Error("Unexpected value `"+s.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+s+"` for `enter` or `visitors`, expected visitor or object with visitors");const u=ta(o),c=i?1:-1;d(e,void 0,[])();function d(h,p,y){const x=h&&typeof h=="object"?h:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return S;function S(){const v=!o||u(h,p,y[y.length-1]||void 0);let m=Gx;if(l&&v&&(m=mm(l(h,y,p)),m[0]===yo))return m;if("children"in h&&h.children){const g=h;if(g.children&&m[0]!==Ic){let w=(i?-1:g.children.length)+c;const $=[...y,g];for(;w>-1&&w<g.children.length;){const k=g.children[w],_=d(k,w,$)();if(_[0]===yo)return _;w=typeof _[1]=="number"?_[1]:w+c}}}if(a&&v){const g=mm(a(h,y,p));if(g[0]===Ic)throw new Error("Unexpected value `"+g[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(g[0]===yo||typeof g[1]=="number")return g}return m}}}function mm(e){return Array.isArray(e)?e:typeof e=="number"?[Dj,e]:e==null?Gx:[e]}function ra(e,t,n,r){let i,o,s;o=t,s=n,typeof o=="function"?Ac(e,i,Rc(o),s):Ac(e,i,zj(o),s)}function zj(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?Rc(e.enter):e.enter,exit:typeof e.exit=="function"?Rc(e.exit):e.exit}}function Rc(e){return t;function t(n,r,i){return e(n,i,r[r.length-1])}}const Oc={}.hasOwnProperty,Bj={};function Uj(e,t){const n=t||Bj,r=new Map,i=new Map,o=new Map,s={...Sj,...n.handlers},l={all:u,applyData:Wj,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:a,options:n,patch:Hj,wrap:qj};return ra(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=String(c.identifier).toUpperCase();c.type==="definition"?r.has(d)||r.set(d,c):i.has(d)||i.set(d,c)}}),l;function a(c,d){const{type:h}=c,p=l.handlers[h];if(Oc.call(l.handlers,h)&&p)return p(l,c,d);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in c){const{children:x,...S}=c;return{..._l(S),children:l.all(c)}}return _l(c)}return(l.options.unknownHandler||Vj)(l,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let p=-1;for(;++p<h.length;){const y=l.one(h[p],c);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=gm(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=gm(x.value))}Array.isArray(y)?d.push(...y):d.push(y)}}}return d}}function Hj(e,t){e.position&&(t.position=IS(e))}function Wj(e,t){let n=t;if(e&&e.data){const{hChildren:r,hName:i,hProperties:o}=e.data;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const s="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,_l(o)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function Vj(e,t){const n=t.data||{},r="value"in t&&!(Oc.call(n,"hProperties")||Oc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qj(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
132
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
133
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
134
|
+
`}),n}function gm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ym(e,t){const n=Uj(e,t),r=n.one(e,void 0),i=Aj(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
135
|
+
`},i),o}function Kj(e,t){return e&&"run"in e?async function(n,r){const i=ym(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ym(n,{file:r,...e||t})}}function vm(e){if(e)throw e}var Vs=Object.prototype.hasOwnProperty,Yx=Object.prototype.toString,xm=Object.defineProperty,wm=Object.getOwnPropertyDescriptor,km=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Yx.call(t)==="[object Array]"},bm=function(t){if(!t||Yx.call(t)!=="[object Object]")return!1;var n=Vs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Vs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Vs.call(t,i)},Em=function(t,n){xm&&n.name==="__proto__"?xm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Sm=function(t,n){if(n==="__proto__")if(Vs.call(t,n)){if(wm)return wm(t,n).value}else return;return t[n]},Gj=function e(){var t,n,r,i,o,s,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=Sm(l,n),i=Sm(t,n),l!==i&&(c&&i&&(bm(i)||(o=km(i)))?(o?(o=!1,s=r&&km(r)?r:[]):s=r&&bm(r)?r:{},Em(l,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&Em(l,{name:n,newValue:i}));return l};const nu=Vm(Gj);function Mc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yj(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(a,...u){const c=e[++o];let d=-1;if(a){s(a);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?Xj(c,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Xj(e,t){let n;return r;function r(...s){const l=e.length>s.length;let a;l&&s.push(i);try{a=e.apply(this,s)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const jn={basename:Qj,dirname:Zj,extname:Jj,join:e_,sep:"/"};function Qj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Zo(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Zj(e){if(Zo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Jj(e){Zo(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function e_(...e){let t=-1,n;for(;++t<e.length;)Zo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":t_(n)}function t_(e){Zo(e);const t=e.codePointAt(0)===47;let n=n_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function n_(e,t){let n="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function Zo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const r_={cwd:i_};function i_(){return"/"}function Pc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function o_(e){if(typeof e=="string")e=new URL(e);else if(!Pc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return s_(e)}function s_(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ru=["history","path","basename","stem","extname","dirname"];class Xx{constructor(t){let n;t?Pc(t)?n={path:t}:typeof t=="string"||l_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":r_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ru.length;){const o=ru[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)ru.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?jn.basename(this.path):void 0}set basename(t){ou(t,"basename"),iu(t,"basename"),this.path=jn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?jn.dirname(this.path):void 0}set dirname(t){Cm(this.basename,"dirname"),this.path=jn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?jn.extname(this.path):void 0}set extname(t){if(iu(t,"extname"),Cm(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pc(t)&&(t=o_(t)),ou(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?jn.basename(this.path,this.extname):void 0}set stem(t){ou(t,"stem"),iu(t,"stem"),this.path=jn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ql(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function iu(e,t){if(e&&e.includes(jn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jn.sep+"`")}function ou(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Cm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function l_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const a_=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},u_={}.hasOwnProperty;class $f extends a_{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Yj()}copy(){const t=new $f;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(nu(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(au("data",this.frozen),this.namespace[t]=n,this):u_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(au("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ns(t),r=this.parser||this.Parser;return su("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),su("process",this.parser||this.Parser),lu("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=Ns(t),a=r.parse(l);r.run(a,l,function(c,d,h){if(c||!d||!h)return u(c);const p=d,y=r.stringify(p,h);f_(y)?h.value=y:h.result=y,u(c,h)});function u(c,d){c||!d?s(c):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),su("processSync",this.parser||this.Parser),lu("processSync",this.compiler||this.Compiler),this.process(t,i),jm("processSync","process",n),r;function i(o,s){n=!0,vm(o),r=s}}run(t,n,r){Nm(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const a=Ns(n);i.run(t,a,u);function u(c,d,h){const p=d||t;c?l(c):s?s(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),jm("runSync","run",r),i;function o(s,l){vm(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Ns(n),i=this.compiler||this.Compiler;return lu("stringify",i),Nm(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(au("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;a(c,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=nu(!0,i.settings,u.settings))}function l(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===u){h=d;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[p,...y]=c;const x=r[h][1];Mc(x)&&Mc(p)&&(p=nu(!0,x,p)),r[h]=[u,p,...y]}}}}const c_=new $f().freeze();function su(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function au(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Nm(e){if(!Mc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ns(e){return d_(e)?e:new Xx(e)}function d_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function f_(e){return typeof e=="string"||p_(e)}function p_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const h_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_m=[],$m={allowDangerousHtml:!0},m_=/^(https?|ircs?|mailto|xmpp)$/i,g_=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function y_(e){const t=v_(e),n=x_(e);return w_(t.runSync(t.parse(n),n),e)}function v_(e){const t=e.rehypePlugins||_m,n=e.remarkPlugins||_m,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$m}:$m;return c_().use(ZN).use(n).use(Kj,r).use(t)}function x_(e){const t=e.children||"",n=new Xx;return typeof t=="string"&&(n.value=t),n}function w_(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,a=t.urlTransform||Qx;for(const c of g_)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+h_+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),ra(e,u),FS(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(c,d,h){if(c.type==="raw"&&h&&typeof d=="number")return s?h.children.splice(d,1):h.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let p;for(p in Ja)if(Object.hasOwn(Ja,p)&&Object.hasOwn(c.properties,p)){const y=c.properties[p],x=Ja[p];(x===null||x.includes(c.tagName))&&(c.properties[p]=a(String(y||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(c,d,h)),p&&h&&typeof d=="number")return l&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d}}}function Qx(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||m_.test(e.slice(0,t))?e:""}function Tm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function k_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function b_(e,t,n){const i=ta((n||{}).ignore||[]),o=E_(t);let s=-1;for(;++s<o.length;)Ac(e,l);function l(u,c,d){if(u.type==="text"&&typeof d=="number")return a(u,c,d);if(i(u,d,c[c.length-1]))return Ic}function a(u,c,d){const h=c[c.length-1],p=o[s][0],y=o[s][1];let x=0,S=!1,v=[];p.lastIndex=0;let m=p.exec(u.value);for(;m;){const w=m.index,$={index:m.index,input:m.input,stack:[...c,u]};let k=y(...m,$);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1)p.lastIndex=w+1;else{if(x!==w&&g({type:"text",value:u.value.slice(x,w)}),Array.isArray(k))for(const _ of k)g(_);else k&&g(k);x=w+m[0].length,S=!0}if(!p.global)break;m=p.exec(u.value)}return S?(x<u.value.length&&g({type:"text",value:u.value.slice(x)}),h.children.splice(d,1,...v)):v=[u],d+v.length;function g(w){const $=v[v.length-1];$&&$.type==="text"&&w.type==="text"?$.value+=w.value:v.push(w)}}}function E_(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([S_(i[0]),C_(i[1])])}return t}function S_(e){return typeof e=="string"?new RegExp(k_(e),"g"):e}function C_(e){return typeof e=="function"?e:function(){return e}}const uu="phrasing",cu=["autolink","link","image","label"];function N_(){return{transforms:[A_],enter:{literalAutolink:__,literalAutolinkEmail:du,literalAutolinkHttp:du,literalAutolinkWww:du},exit:{literalAutolink:I_,literalAutolinkEmail:L_,literalAutolinkHttp:$_,literalAutolinkWww:T_}}}function j_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uu,notInConstruct:cu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uu,notInConstruct:cu},{character:":",before:"[ps]",after:"\\/",inConstruct:uu,notInConstruct:cu}]}}function __(e){this.enter({type:"link",title:null,url:"",children:[],position:void 0},e)}function du(e){this.config.enter.autolinkProtocol.call(this,e)}function $_(e){this.config.exit.autolinkProtocol.call(this,e)}function T_(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function L_(e){this.config.exit.autolinkEmail.call(this,e)}function I_(e){this.exit(e)}function A_(e){b_(e,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),R_],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),P_],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),M_],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),O_]],{ignore:["link","linkReference"]})}function R_(e,t,n,r,i){if(!z_(i))return!1;let o="";if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),Xo(n.charCodeAt(0))||!F_(n))return!1;const s=D_(n+r),l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0],position:void 0}],position:void 0};return s[1]?[l,{type:"text",value:s[1],position:void 0}]:l}function O_(e,t,n){return/[\d\-_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n,position:void 0}],position:void 0}}function M_(e,t,n){if(/[\d\-_]$/.test(n))return!1;const r="mailto:"+t+"@"+n;return{type:"link",title:null,url:r,children:[{type:"text",value:r,position:void 0}],position:void 0}}function P_(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)==="@"))return!1;const o="xmpp:"+t+"@"+n+(r||"");return{type:"link",title:null,url:o,children:[{type:"text",value:o,position:void 0}],position:void 0}}function F_(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function D_(e){let t=e.length;for(;t>0;){const s=e.charCodeAt(t-1);if(s===33||s===34||s===38||s===39||s===41||s===44||s===46||s===58||s===59||s===60||s===62||s===63||s===93||s===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(")");const i=Tm(e,"(");let o=Tm(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function z_(e){const t=e.input.charCodeAt(e.index-1);return e.index===0||Hr(t)||Xo(t)}Zx.peek=Y_;function B_(){this.buffer()}function U_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function H_(){this.buffer()}function W_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function V_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function q_(e){this.exit(e)}function K_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function G_(e){this.exit(e)}function Y_(){return"["}function Zx(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function X_(){return{enter:{gfmFootnoteCallString:B_,gfmFootnoteCall:U_,gfmFootnoteDefinitionLabelString:H_,gfmFootnoteDefinition:W_},exit:{gfmFootnoteCallString:V_,gfmFootnoteCall:q_,gfmFootnoteDefinitionLabelString:K_,gfmFootnoteDefinition:G_}}}function Q_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Zx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let a=l.move("[^");const u=o.enter("footnoteDefinition"),c=o.enter("label");return a+=l.move(o.safe(o.associationId(r),{before:a,after:"]"})),c(),a+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),a+=l.move((t?`
|
|
136
|
+
`:" ")+o.indentLines(o.containerFlow(r,l.current()),t?Jx:Z_))),u(),a}}function Z_(e,t,n){return t===0?e:Jx(e,t,n)}function Jx(e,t,n){return(n?"":" ")+e}const J_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tf.attention=i$;Tf.peek=o$;function e$(){return{canContainEols:["delete"],enter:{strikethrough:n$},exit:{strikethrough:r$}}}function t$(){return{handlers:{delete:Tf},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:J_}]}}function n$(e){this.enter({type:"delete",children:[],position:void 0},e)}function r$(e){this.exit(e)}function Tf(e,t,n,r){const i=n.createTracker(r),o=n.stack.includes("strikethrough")?"~":"~~",s=n.enter("strikethrough");let l=i.move(o);return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move(o),s(),l}function i$(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function o$(){return"~"}function s$(e){return e.length}function l$(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||s$,o=[],s=[],l=[],a=[];let u=0,c=-1;for(;++c<e.length;){const x=[],S=[];let v=-1;for(e[c].length>u&&(u=e[c].length);++v<e[c].length;){const m=a$(e[c][v]);if(n.alignDelimiters!==!1){const g=i(m);S[v]=g,(a[v]===void 0||g>a[v])&&(a[v]=g)}x.push(m)}s[c]=x,l[c]=S}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)o[d]=Lm(r[d]);else{const x=Lm(r);for(;++d<u;)o[d]=x}d=-1;const h=[],p=[];for(;++d<u;){const x=o[d];let S="",v="";x===99?(S=":",v=":"):x===108?S=":":x===114&&(v=":");let m=n.alignDelimiters===!1?1:Math.max(1,a[d]-S.length-v.length);const g=S+"-".repeat(m)+v;n.alignDelimiters!==!1&&(m=S.length+m+v.length,m>a[d]&&(a[d]=m),p[d]=m),h[d]=g}s.splice(1,0,h),l.splice(1,0,p),c=-1;const y=[];for(;++c<s.length;){const x=s[c],S=l[c],v=n.fillRows===!1?Math.max(1,s[c===1?0:c].length):u;d=-1;const m=[];for(;++d<v;){const g=x[d]||"";let w="",$="";if(n.alignDelimiters!==!1){const k=a[d]-(S[d]||0),_=o[d];if(_===114)w=" ".repeat(k);else if(_===99){const N=k/2;k%2?(w=" ".repeat(N+.5),$=" ".repeat(N-.5)):(w=" ".repeat(N),$=w)}else $=" ".repeat(k)}n.delimiterStart!==!1&&!d&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||d)&&m.push(" "),n.alignDelimiters!==!1&&m.push(w),m.push(g),n.alignDelimiters!==!1&&m.push($),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||d!==v-1)&&m.push("|")}y.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return y.join(`
|
|
137
|
+
`)}function a$(e){return e==null?"":String(e)}function Lm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const u$=ta(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function c$(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),d$);return i(),s}function d$(e,t,n){return">"+(n?"":" ")+e}function f$(e,t){return Im(e,t.inConstruct,!0)&&!Im(e,t.notInConstruct,!1)}function Im(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Am(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const o=n.unsafe[i];if(o.character===`
|
|
138
|
+
`&&!o.before&&!o.after&&f$(n.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
139
|
+
`}function p$(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function h$(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function m$(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function g$(e,t,n,r){const i=m$(n),o=e.value||"";if(h$(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,y$);return d(),h}const s=n.createTracker(r),l=i.repeat(Math.max(p$(o,i)+1,3)),a=n.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let c=s.move(l);if(e.lang){const d=n.enter(`codeFencedLang${u}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${u}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
|
|
140
|
+
`,encode:["`"],...s.current()})),d()}return c+=s.move(`
|
|
141
|
+
`),o&&(c+=s.move(o+`
|
|
142
|
+
`)),c+=s.move(l),a(),c}function y$(e,t,n){return(n?"":" ")+e}function Lf(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function v$(e,t,n,r){const i=Lf(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
143
|
+
`,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function x$(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function $l(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function xi(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function ew(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Rm(e,t,n){const r=mr(e),i=mr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function w$(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const l=e.charCodeAt(2);return l===45?2:l===91?5:xt(l)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,o=e.charCodeAt(i);if(!xt(o))return;for(;o===45||wt(o);)o=e.charCodeAt(++i);const s=e.slice(r,i).toLowerCase();return!n&&o!==47&&Lc.includes(s)?1:Px.includes(s)?6:7}const tw=new Map([["*",!1],["_",!0]]);function k$(e,t,n){const r=new Set;for(const o of e){const s=n.get(o);if(s&&o.attention&&t.some(l=>l.attention===o.attention))for(const l of s.tokens)r.add(l.attention)}const i=[];for(const o of e)o.attention&&r.delete(o.attention)&&i.push(o.attention);return i.reverse(),i}function nw(e,t,n){const r=[],i=new Map,o=new Map;let s=0;for(;s<e.length;){if(!e[s].attention){s++;continue}const l=e[s].value.charAt(0),a=tw.get(l);let u=s+1;for(;u<e.length&&e[u].attention&&e[u].value.charAt(0)===l;)u++;const c=s?e[s-1].value:t,d=mr(c.charCodeAt(c.length-1)),h=mr((u<e.length?e[u].value:n).charCodeAt(0)),p=!h||h===2&&!!d,y=!d||d===2&&!!h,x={tokens:e.slice(s,u),markers:[],start:0,end:0,open:a?p&&(!!d||!y):p,close:a?y&&(!!h||!p):y,split:a!==void 0};for(const S of x.tokens){i.set(S,[...x.tokens]),o.set(S,x);let v=S.value.length;for(;v--;)x.markers.push(S)}x.end=x.markers.length,r.push(x),s=u}for(E$(r,i),s=-1;++s<e.length;){const l=i.get(e[s]);if(l)return{attention:k$(e,l,o),index:s}}}function js(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?$l(n.value):xi(n.value),i=ew(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let o=n.value.slice(0,n.value.length-r.length),s=0;for(;o.charCodeAt(o.length-1-s)===92;)s++;s%2&&(o+="\\"),n.value=o+i}}function b$(e,t,n,r,i){for(const o of n.attention){const s=t.get(o)||o.sequences[0];for(const l of o.sequences){if(l===s)continue;const a=new Map(t);a.set(o,l);const u=ia(e,a,r,i),c=nw(u,r,i);if(!c||c.index>n.index)return{chosen:a,mistake:c,tokens:u}}}}function E$(e,t){const n=new Map;for(const r of e){const i=r.tokens[0].value.charAt(0);let o=n.get(i);o||(o=[],n.set(i,o));let s=r.close?o.length:0;for(;s--&&r.start<r.end;){const l=o[s],a=l.end-l.start,u=r.end-r.start;if(r.split?(l.close||r.open)&&u%3&&!((a+u)%3):a!==l.markers.length||a!==u)continue;const c=r.split?a>1&&u>1?2:1:u,d=l.markers.slice(l.end-c,l.end),h=r.markers.slice(r.start,r.start+c),p=d[0],y=h[0];if(p===d[c-1]&&p.value.length===c&&y===h[c-1]&&y.value.length===c&&p.attention===y.attention)t.delete(p),t.delete(y);else{const x=[...new Set([...d,...h])];for(const S of x){const v=t.get(S);v&&v.push(...x)}}l.end-=c,r.start+=c,l.start===l.end&&o.splice(s,1),s=o.length}r.open&&r.start<r.end&&o.push(r)}}function S$(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!_x(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const o of n)r.push(i.repeat(o))}return r}function C$(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,l=n.before;r.push(-1);let a=t.createTracker(n);for(;++s<i.length;){const u=i[s];let c;if(r[r.length-1]=s,s+1<i.length){let p=t.handle.handlers[i[s+1].type];p&&p.peek&&(p=p.peek),c=p?$l(p(i[s+1],e,t,{before:"",after:"",...a.current()})):""}else c=n.after;const d=o[o.length-1];typeof d=="string"&&(l==="\r"||l===`
|
|
144
|
+
`)&&u.type==="html"&&w$(u.value)!==7&&(o[o.length-1]=d.replace(/(\r?\n|\r)$/," "),l=" ",a=t.createTracker(n),a.move(oa(o,n.before,n.after)));const h=t.handle.handlers[u.type];if(h&&h.attention){const p=If(u,h.attention,t,a);if(!p)continue;o.push(p),l=xi(p.sequences[0])}else{const p=t.handle(u,e,t,{...a.current(),after:c,before:l});if(!p)continue;a.move(p),o.push(p),l=xi(p)}}return r.pop(),o}function If(e,t,n,r){const{construct:i,markers:o,sizes:s}=t(e,n),l=S$(e.type,o,s),a=l[0],u=n.enter(i),c=n.createTracker(r.current());c.move(a);const d=C$(e,n,{...c.current(),before:a,after:a});if(u(),d.length!==0)return r.move(a),r.move(oa(d,a,a)),r.move(a),{children:d,sequences:l}}function Om(e,t,n,r){let i=ia(e,t,n,r),o=nw(i,n,r);for(;o;){const s=b$(e,t,o,n,r);if(!s)return;t=s.chosen,i=s.tokens,o=s.mistake}return i}function rw(e,t,n,r){let i=n,o=-1;for(;++o<e.length;){const s=e[o];if(typeof s=="string"){i="";continue}const l=o===e.length-1?r:"",a=s.sequences.find(function(u){const c=u.charAt(0);return c!==i.charAt(0)&&c!==l.charAt(0)||e.length===1&&tw.has(c)&&u.length>n.length})||s.sequences[0];a!==s.sequences[0]&&t.set(s,a),rw(s.children,t,a,a),i=a}}function ia(e,t,n,r){const i=[];let o,s=xi(n),l=-1;for(;++l<e.length;){const a=e[l];if(typeof a=="string"){const g={value:a,attention:void 0};o&&o===$l(a)&&js([g],!0),o=void 0,i.push(g),g.value&&(s=xi(g.value));continue}const u=t.get(a)||a.sequences[0],c=u.charAt(0),d=e[l+1],h=s,p=$l(d===void 0?r:typeof d=="string"?d:t.get(d)||d.sequences[0]),y=ia(a.children,t,u,u),x=y[0].value,S=Rm(h.charCodeAt(h.length-1),x.charCodeAt(0),c);S.inside&&js(y,!0);const v=xi(y[y.length-1].value),m=Rm(p.charCodeAt(0),v.charCodeAt(v.length-1),c);m.inside&&js(y,!1),S.outside&&h!==`
|
|
145
|
+
`&&h!=="\r"&&js(i,!1),m.outside&&(o=p),i.push({value:u,attention:a},...y,{value:u,attention:a}),s=u.charAt(u.length-1)}return i}function oa(e,t,n){const r=new Map;rw(e,r,t,n);const i=(r.size>0?Om(e,r,t,n):void 0)||Om(e,new Map,t,n)||ia(e,new Map,t,n);let o="";for(const s of i)o+=s.value;return o}Af.attention=iw;Af.peek=N$;function Af(e,t,n,r){const i=n.enter("phrasing"),o=If(e,iw,n,n.createTracker(r)),s=o?oa([o],r.before,r.after):"";return i(),s}function iw(e,t){return{construct:"emphasis",markers:x$(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function N$(e,t,n){return n.options.emphasis||"*"}function j$(e,t){let n=!1;return ra(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,yo}),!!((!e.depth||e.depth<3)&&Zl(e)&&(t.options.setext||n))}function _$(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(j$(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
146
|
+
`,after:`
|
|
147
|
+
`});return h(),d(),p+`
|
|
148
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
149
|
+
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
150
|
+
`,...o.current()});const c=u.charCodeAt(0);return(c===9||c===32)&&(u=ew(c)+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}ow.peek=$$;function ow(e){return e.value||""}function $$(){return"<"}sw.peek=T$;function sw(e,t,n,r){const i=Lf(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function T$(){return"!"}lw.peek=L$;function lw(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=c.filter(function(h){return h!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function L$(){return"!"}aw.peek=I$;function aw(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);if(!s.atBreak)continue;let a;for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function I$(){return"`"}function uw(e,t){const n=Zl(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}cw.peek=A$;function cw(e,t,n,r){const i=Lf(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);if(uw(e,n)){const y=n.stack;n.stack=y.filter(function(v){return v!=="phrasing"});const x=n.enter("autolink");let S=s.move("<");return S+=s.move(n.containerPhrasing(e,{before:S,after:">",...s.current()})),S+=s.move(">"),x(),n.stack=y,S}const l=n.enter("link");let a=n.enter("label"),u=s.move("[");const c=n.containerPhrasing(e,{before:u,after:"](",...s.current()});u+=s.move(c),a(),u+=s.move("](");const d=/[\0- \u007F]/.test(e.url),h=r.before.charAt(r.before.length-1);let p=e.title||void 0;if(!p&&!d&&(h===`
|
|
151
|
+
`||h==="\r")){let y=0;for(;y<c.length&&c.charCodeAt(y)!==93;)y+=c.charCodeAt(y)===92?2:1;c.charCodeAt(y+1)===58&&(p="")}return!e.url&&typeof p=="string"||d?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:typeof p=="string"?" ":")",...s.current()}))),a(),typeof p=="string"&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(p,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function A$(e,t,n){return uw(e,n)?"<":"["}dw.peek=R$;function dw(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=c.filter(function(h){return h!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function R$(){return"["}function Rf(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function O$(e){const t=Rf(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function M$(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function fw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function P$(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?M$(n):Rf(n);const l=e.ordered?s==="."?")":".":O$(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),fw(n)===s&&c){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function F$(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function D$(e,t,n,r){const i=F$(n);let o=n.bulletCurrent||Rf(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,h,p){return h?(p?"":" ".repeat(s))+d:(p?o:o+" ".repeat(s-o.length))+d}}function z$(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}function B$(e,t,n,r){if(!e.children.some(function(l){return u$(l)}))return n.containerFlow(e,r);const o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),s}function U$(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Of.attention=pw;Of.peek=H$;function Of(e,t,n,r){const i=n.enter("phrasing"),o=If(e,pw,n,n.createTracker(r)),s=o?oa([o],r.before,r.after):"";return i(),s}function pw(e,t){return{construct:"strong",markers:U$(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function H$(e,t,n){return n.options.strong||"*"}function W$(e,t,n,r){const i=t?t.children:[],o=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})}function V$(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function q$(e,t,n){const r=(fw(n)+(n.options.ruleSpaces?" ":"")).repeat(V$(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Fc={blockquote:c$,break:Am,code:g$,definition:v$,emphasis:Af,hardBreak:Am,heading:_$,html:ow,image:sw,imageReference:lw,inlineCode:aw,link:cw,linkReference:dw,list:P$,listItem:D$,paragraph:z$,root:B$,strong:Of,text:W$,thematicBreak:q$};function K$(){return{enter:{table:G$,tableData:Mm,tableHeader:Mm,tableRow:X$},exit:{codeText:Q$,table:Y$,tableData:fu,tableHeader:fu,tableRow:fu}}}function G$(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[],position:void 0},e),this.data.inTable=!0}function Y$(e){this.exit(e),this.data.inTable=void 0}function X$(e){this.enter({type:"tableRow",children:[],position:void 0},e)}function fu(e){this.exit(e)}function Mm(e){this.enter({type:"tableCell",children:[],position:void 0},e)}function Q$(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Z$));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Z$(e,t){return t==="|"?t:e}function J$(e){const t=e||{},{tableCellPadding:n,tablePipeAlign:r,stringLength:i}=t,o=n?" ":"|";return{handlers:{inlineCode:h,table:s,tableCell:a,tableRow:l},join:[eT],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
152
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function s(p,y,x,S){const v=c(p,x,S),m=v[0];if(m){let g=p.align?p.align.length:0,w=-1;if(!g)for(;++w<v.length;)v[w].length>g&&(g=v[w].length);for(;m.length<g;)m.push("")}return u(v,p.align)}function l(p,y,x,S){const v=d(p,x,S),m=u([v]);return m.slice(0,m.indexOf(`
|
|
153
|
+
`))}function a(p,y,x,S){const v=x.enter("tableCell"),m=x.enter("phrasing"),g=x.containerPhrasing(p,{...S,before:o,after:o});return m(),v(),g}function u(p,y){return l$(p,{align:y,alignDelimiters:r,fillRows:!1,padding:n,stringLength:i})}function c(p,y,x){const{children:S}=p;let v=-1;const m=[],g=y.enter("table");for(;++v<S.length;)m[v]=d(S[v],y,x);return g(),m}function d(p,y,x){const{children:S}=p;let v=-1;const m=[],g=y.enter("tableRow");for(;++v<S.length;)m[v]=a(S[v],p,y,x);return g(),m}function h(p,y,x){const S=Fc.inlineCode(p,y,x);if(!x.stack.includes("tableCell"))return S;const v=[];let m=0,g=S.indexOf("|");for(;g!==-1;){let w=g;for(;w>m&&S.charCodeAt(w-1)===92;)w--;v.push(S.slice(m,g)),(g-w)%2===0&&v.push("\\"),m=g,g=S.indexOf("|",g+1)}return v.push(S.slice(m)),v.join("")}}function eT(e,t,n,r){if(e.type==="table"&&n.type==="listItem"&&n.spread===!1&&(t.type==="definition"||t.type==="heading"&&tT(t,r)||t.type==="paragraph"||t.type==="table"))return 1}function tT(e,t){let n=!1;return ra(e,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return n=!0,yo}),!!((!e.depth||e.depth<3)&&Zl(e)&&(t.options.setext||n))}function nT(){return{exit:{taskListCheckValueChecked:Pm,taskListCheckValueUnchecked:Pm,paragraph:iT}}}function rT(){return{handlers:{paragraph:oT},join:[sT]}}function Pm(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start={...r.position.start}))}}this.exit(e)}function oT(e,t,n,r){if(!t||t.type!=="listItem"||hw(t)!==e)return Fc.paragraph(e,t,n,r);const i="["+(t.checked?"x":" ")+"] ",o=n.createTracker(r);o.move(i);const s=Fc.paragraph(e.children.length>0?e:{type:"paragraph",children:[{type:"text",value:" "}]},t,n,{...r,...o.current()});return i+s}function sT(e,t,n){if(!(e.type==="definition"&&n.type==="listItem"))return;const r=hw(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function hw(e){if(typeof e.checked=="boolean")for(const t of e.children){if(t.type==="paragraph")return t;if(t.type!=="definition")return}}function lT(){return[N_(),X_(),e$(),K$(),nT()]}function aT(e){return{extensions:[j_(),Q_(e),t$(),J$(e),rT()]}}const uT={tokenize:mT,partial:!0},mw={tokenize:gT,partial:!0},gw={tokenize:yT,partial:!0},yw={tokenize:vT,partial:!0},cT={tokenize:xT,partial:!0},vw={name:"wwwAutolink",tokenize:pT,previous:ww},xw={name:"protocolAutolink",tokenize:hT,previous:kw},Kn={name:"emailAutolink",tokenize:fT,previous:bw},An={};function dT(){return{text:An}}let wr=48;for(;wr<123;)An[wr]=Kn,wr++,wr===58?wr=65:wr===91&&(wr=97);An[43]=Kn;An[45]=Kn;An[46]=Kn;An[95]=Kn;An[72]=[Kn,xw];An[104]=[Kn,xw];An[87]=[Kn,vw];An[119]=[Kn,vw];function fT(e,t,n){const r=this;let i,o;return s;function s(d){return!Dc(d)||!bw.call(r,r.previous)||Mf(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Dc(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(cT,c,u)(d):d===45||d===95||wt(d)?(o=!0,e.consume(d),a):c(d)}function u(d){return e.consume(d),i=!0,a}function c(d){return o&&i&&xt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function pT(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!ww.call(r,r.previous)||Mf(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(uT,e.attempt(mw,e.attempt(gw,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function hT(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&kw.call(r,r.previous)&&!Mf(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(xt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),a}return n(d)}function a(d){return d===47?(e.consume(d),o?u:(o=!0,a)):n(d)}function u(d){return d===null||Cl(d)||qe(d)||Hr(d)||Xo(d)?n(d):e.attempt(mw,e.attempt(gw,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function mT(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function gT(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(yw,a,l)(u):u===null||qe(u)||Hr(u)||u!==45&&Xo(u)?a(u):(o=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function a(u){return i||r||!o?n(u):t(u)}}function yT(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(yw,t,o)(s):s===null||qe(s)||Hr(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function vT(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||qe(l)||Hr(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||qe(l)||Hr(l)?t(l):r(l)}function o(l){return xt(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):xt(l)?(e.consume(l),s):n(l)}}function xT(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return wt(o)?n(o):t(o)}}function ww(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||qe(e)}function kw(e){return!xt(e)}function bw(e){return!(e===47||Dc(e))}function Dc(e){return e===43||e===45||e===46||e===95||wt(e)}function Mf(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const wT={tokenize:_T,partial:!0};function kT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:CT,continuation:{tokenize:NT},exit:jT}},text:{91:{name:"gfmFootnoteCall",tokenize:ST},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:bT,resolveTo:ET}}}}function bT(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return n(a);const u=bn(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function ET(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function ST(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),a}function a(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||qe(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(bn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return qe(d)||(s=!0),o++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function CT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(y)}function c(y){if(s>999||y===93&&!l||y===null||y===91||qe(y))return n(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=bn(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return qe(y)||(l=!0),s++,e.consume(y),y===92?d:c}function d(y){return y===91||y===92||y===93?(e.consume(y),s++,c):c(y)}function h(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(o)||i.push(o),ze(e,p,"gfmFootnoteDefinitionWhitespace")):n(y)}function p(y){return t(y)}}function NT(e,t,n){return e.check(Qo,t,e.attempt(wT,t,n))}function jT(e){e.exit("gfmFootnoteDefinition")}function _T(e,t,n){const r=this;return ze(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function $T(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},h=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&kn(h,h.length,0,Jl(p,s.slice(u+1,a),l)),kn(h,h.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),kn(s,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let d=0;return h;function h(y){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(y):(s.enter("strikethroughSequenceTemporary"),p(y))}function p(y){const x=mr(u);if(y===126)return d>1?a(y):(s.consume(y),d++,p);if(d<2&&!n)return a(y);const S=s.exit("strikethroughSequenceTemporary"),v=mr(y);return S._open=!v||v===2&&!!x,S._close=!x||x===2&&!!v,l(y)}}}class TT{constructor(){this.map=[],this.index=new Map}add(t,n,r){LT(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}}function LT(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}function IT(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function AT(){return{flow:{null:{name:"table",tokenize:RT,resolveAll:OT}}}}function RT(e,t,n){const r=this;let i=0,o=0,s;return l;function l(E){let O=r.events.length-1;for(;O>-1;){const{type:R}=r.events[O][1];if(R==="lineEnding"||R==="linePrefix")O--;else break}const C=O>-1?r.events[O][1].type:null,A=C==="tableHead"||C==="tableRow"?k:a;return A===k&&r.parser.lazy[r.now().line]?n(E):A(E)}function a(E){return e.enter("tableHead"),e.enter("tableRow"),u(E)}function u(E){return E===124||(s=!0,o+=1),c(E)}function c(E){return E===null?n(E):$e(E)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p):n(E):Me(E)?ze(e,c,"whitespace")(E):(o+=1,s&&(s=!1,i+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(E)))}function d(E){return E===null||E===124||qe(E)?(e.exit("data"),c(E)):(e.consume(E),E===92?h:d)}function h(E){return E===92||E===124?(e.consume(E),d):d(E)}function p(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(e.enter("tableDelimiterRow"),s=!1,Me(E)?ze(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):y(E))}function y(E){return E===45||E===58?S(E):E===124?(s=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),x):$(E)}function x(E){return Me(E)?ze(e,S,"whitespace")(E):S(E)}function S(E){return E===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),v):E===45?(o+=1,v(E)):E===null||$e(E)?w(E):$(E)}function v(E){return E===45?(e.enter("tableDelimiterFiller"),m(E)):$(E)}function m(E){return E===45?(e.consume(E),m):E===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(E))}function g(E){return Me(E)?ze(e,w,"whitespace")(E):w(E)}function w(E){return E===124?y(E):E===null||$e(E)?!s||i!==o?$(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):$(E)}function $(E){return n(E)}function k(E){return e.enter("tableRow"),_(E)}function _(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),_):E===null||$e(E)?(e.exit("tableRow"),t(E)):Me(E)?ze(e,_,"whitespace")(E):(e.enter("data"),N(E))}function N(E){return E===null||E===124||qe(E)?(e.exit("data"),_(E)):(e.consume(E),E===92?D:N)}function D(E){return E===92||E===124?(e.consume(E),N):N(E)}}function OT(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,u,c,d;const h=new TT;for(;++n<e.length;){const p=e[n],y=p[1];p[0]==="enter"?y.type==="tableHead"?(l=!1,a!==0&&(Fm(h,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",u,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,c={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",c,t]])),i=y.type==="tableDelimiterRow"?2:c?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=_s(h,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=_s(h,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):y.type==="tableHead"?(l=!0,a=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],d=_s(h,t,o,i,n,d)):s[1]!==0&&(d=_s(h,t,s,i,n,d)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&Fm(h,t,a,u,c),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=IT(t.events,n))}return e}function _s(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Jr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=Jr(t.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Jr(t.events,n[2]),c=Jr(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,x=n[3]-n[2]-1;e.add(y,x,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Jr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Fm(e,t,n,r,i){const o=[],s=Jr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Jr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const MT={name:"tasklistCheck",tokenize:FT};function PT(){return{text:{91:MT}}}function FT(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return qe(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return $e(a)?t(a):Me(a)?e.check({tokenize:DT},t,n)(a):n(a)}}function DT(e,t,n){return ze(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function zT(e){return Nx([dT(),kT(),$T(e),AT(),PT()])}const BT={};function UT(e){const t=this,n=e||BT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(zT(n)),o.push(lT()),s.push(aT(n))}function HT({file:e,split:t,version:n}){const r=e.status==="added"?["new"]:e.status==="removed"?["old"]:t?["old","new"]:["new"];return f.jsx("div",{className:`fs-md-sides n${r.length}`,children:r.map(i=>f.jsx(WT,{side:i,path:i==="old"?e.oldPath??e.path:e.path,diffPath:e.path,version:n,labelled:r.length>1},i))})}function WT({side:e,path:t,diffPath:n,version:r,labelled:i}){const[o,s]=T.useState(null),[l,a]=T.useState(null);T.useEffect(()=>{let c=!0;return a(null),ax(n,e).then(d=>c&&s(d.join(`
|
|
154
|
+
`)),d=>c&&a(d instanceof Error?d.message:String(d))),()=>{c=!1}},[n,e,r]);const u={a:({href:c,children:d})=>c&&/^(https?:|mailto:)/i.test(c)?f.jsx("a",{href:c,target:"_blank",rel:"noreferrer noopener",children:d}):f.jsx("span",{className:"fs-md-link",title:c,children:d}),code:({className:c,children:d})=>{var x;const h=(x=/language-([\w+-]+)/.exec(c??""))==null?void 0:x[1],p=String(d??"").replace(/\n$/,""),y=h?tS(p,h):void 0;return y?f.jsx("code",{className:c,children:y.map((S,v)=>f.jsxs("span",{children:[S.map((m,g)=>m.types?f.jsx("span",{className:`token ${m.types}`,children:m.text},g):m.text),v<y.length-1&&`
|
|
155
|
+
`]},v))}):f.jsx("code",{className:c,children:d})}};return f.jsxs("div",{className:`fs-md-side ${e}`,children:[i&&f.jsx("div",{className:`fs-image-side ${e}`,children:e==="old"?"変更前":"変更後"}),l?f.jsxs("div",{className:"ds-muted",children:["読み込めませんでした: ",l]}):o===null?f.jsx("div",{className:"ds-muted",children:"読み込み中…"}):f.jsx("div",{className:"fs-md",children:f.jsx(y_,{remarkPlugins:[UT],components:u,urlTransform:(c,d)=>VT(c,d,t,e,r),children:o})})]})}function VT(e,t,n,r,i){if(t!=="src"||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//"))return Qx(e);const o=qT(n,e.replace(/[?#].*$/,""));return o?ux(o,r,i):""}function qT(e,t){let n=t;try{n=decodeURIComponent(t)}catch{}const r=n.startsWith("/")?[]:e.split("/").slice(0,-1);for(const i of n.split("/"))if(!(i===""||i==="."))if(i===".."){if(!r.length)return null;r.pop()}else r.push(i);return r.length?r.join("/"):null}const Ew=1500;function Sw(e){if(bc(e.path))return{label:"画像",first:e.binary?"preview":"diff"};if(qE(e.path)&&!e.binary&&!e.large)return{label:"プレビュー",first:"diff"}}const KT=T.memo(function(t){const{file:n}=t,r=T.useRef(null),i=XT(r,t.scrollRoot),[o,s]=T.useState(!1),l=ox(n),a=Sw(n),u=a?t.view:"diff",c=T.useMemo(()=>rx(n,t.content,t.expansion),[n,t.content,t.expansion]),d=T.useMemo(()=>i?eS(n,t.content):void 0,[n,t.content,i]);T.useEffect(()=>(t.register(n.path,r.current),()=>t.register(n.path,null)),[n.path,t.register]);const h=async()=>{await Ai(n.path),s(!0),window.setTimeout(()=>s(!1),1400)},p=!!n.unchanged,y=p?YT(n):GT(n),x=()=>u==="preview"?i?bc(n.path)?f.jsx(nS,{file:n,version:t.version}):f.jsx(HT,{file:n,split:t.mode==="split",version:t.version}):f.jsx("div",{className:"fs-placeholder",style:{height:240}}):y?f.jsx("div",{className:"fs-note",children:y}):i?f.jsx(XE,{file:n,mode:p?"unified":t.mode,rows:c,tokens:d,byLine:t.byLine,onExpand:(S,v)=>t.onExpand(n.path,S,v)}):f.jsx("div",{className:"fs-placeholder",style:{height:(l+n.chunks.length)*20}});return f.jsxs("section",{ref:r,className:`fs-file${t.reviewed?" reviewed":""}${p?" unchanged":""}`,"data-path":n.path,children:[f.jsxs("header",{className:"fs-file-head",children:[f.jsx("button",{className:`fs-fold${t.open?" open":""}`,onClick:()=>t.onToggle(n.path),"aria-label":t.open?"折りたたむ":"開く","aria-expanded":t.open,children:f.jsx(Md,{size:14})}),f.jsx(ji,{status:p?"unchanged":n.status}),f.jsxs("span",{className:"fs-file-path",title:n.oldPath?`${n.oldPath} → ${n.path}`:n.path,onClick:()=>t.onToggle(n.path),children:[n.oldPath&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"fs-old-path",children:n.oldPath}),f.jsx("span",{className:"ds-muted",children:" → "})]}),n.path]}),f.jsx("button",{className:"fs-icon-btn",onClick:()=>void h(),title:o?"コピーしました":"パスをコピー","aria-label":"パスをコピー",children:f.jsx(sv,{size:13})}),n.generated&&f.jsx("span",{className:"fs-tag",title:"ロックファイルや生成されたコード(最初は折りたたんでいます)",children:"生成"}),p&&f.jsx("span",{className:"fs-tag",title:"ツリーの「全体」から開いた、変更していないファイル",children:"変更なし"}),f.jsx("span",{className:"ds-spacer"}),a&&!(bc(n.path)&&n.binary)&&f.jsx("span",{className:"ds-seg fs-view-seg",role:"radiogroup","aria-label":"表示",children:[["diff","差分"],["preview",a.label]].map(([S,v])=>f.jsx("button",{role:"radio","aria-checked":u===S,className:u===S?"on":"",onClick:()=>t.onView(n.path,S),children:v},S))}),t.commentCount>0&&f.jsx(Mo,{n:t.commentCount,title:`コメント ${t.commentCount}`}),p?t.onClose&&f.jsx("button",{className:"ds-btn",onClick:()=>t.onClose(n.path),title:"一覧から外す(ツリーの「全体」からまた開けます)",children:"閉じる"}):f.jsxs(f.Fragment,{children:[f.jsx(Oi,{stats:{added:n.additions,removed:n.deletions},title:`追加 ${n.additions} 行・削除 ${n.deletions} 行`}),f.jsxs("label",{className:"ds-check fs-viewed",title:"確認済みにすると折りたたみます(このファイルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t.reviewed,onChange:S=>t.onReviewed(n.path,S.target.checked)}),"確認済み"]})]})]}),t.open&&f.jsxs("div",{className:"fs-file-body",children:[t.orphans.length>0&&f.jsxs("div",{className:"fs-orphans",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなった行へのコメント"}),t.orphans.map(S=>f.jsx(mf,{c:S,showWhere:!0},S.id))]}),x()]}),!t.open&&(n.generated||l>Ew)&&!t.reviewed&&f.jsxs("div",{className:"fs-folded",children:[n.generated?"生成されたファイルのため折りたたんでいます":`大きな差分(${l} 行)のため折りたたんでいます`,f.jsx("button",{className:"ds-link",onClick:()=>t.onToggle(n.path),children:"表示する"})]})]})});function GT(e){if(e.binary)return"バイナリファイルのため、行の差分はありません";if(e.large)return"大きすぎるため、行の差分を表示していません";if(!(e.chunks.length>0))return e.modeChange?`ファイルのモードだけが変わりました(${e.modeChange})`:e.status==="renamed"?"名前だけが変わりました(内容の変更はありません)":"空のファイルです"}function YT(e){return e.loading?"読み込み中…":e.binary?"バイナリファイルです":e.large?"大きすぎるため、内容を表示していません":e.chunks.length===0?"空のファイルです":void 0}function XT(e,t){const[n,r]=T.useState(!1);return T.useEffect(()=>{const i=e.current;if(n||!i||!t)return;const o=new IntersectionObserver(s=>{s.some(l=>l.isIntersecting)&&r(!0)},{root:t,rootMargin:"1200px 0px"});return o.observe(i),()=>o.disconnect()},[e,t,n]),n}const Dm=(e,t)=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n};function QT({mode:e,onMode:t,tree:n,error:r,current:i,reviewed:o,commentCounts:s,onSelect:l,onReviewed:a}){var k,_;const[u,c]=T.useState(""),d=e==="all",[h,p]=T.useState(new Set),[y,x]=T.useState(null),S=T.useMemo(()=>d&&n?$E(n):null,[d,n]);T.useEffect(()=>{S&&y===null&&x(S)},[S,y]);const v=T.useMemo(()=>n?tx(n,u):null,[n,u]),m=T.useMemo(()=>n&&!d?ex(n):[],[n,d]),g=N=>{var D;return u.trim()!==""||(d?((D=y??S)==null?void 0:D.has(N))===!0:!h.has(N))},w=N=>d?x(D=>Dm(D??S??new Set,N)):p(D=>Dm(D,N)),$=(N,D)=>{var C;const E={paddingLeft:8+D*12};if(N.plain||(C=N.file)!=null&&C.unchanged)return f.jsxs("div",{className:`fs-tree-row file plain${i===N.path?" current":""}${N.file?" shown":""}`,style:E,onClick:()=>l(N.path),title:`${N.path}(変更なし)`,children:[f.jsx("span",{className:"fs-tree-check-space"}),f.jsx(ji,{status:"unchanged",small:!0}),f.jsx("span",{className:"fs-tree-name",children:N.name}),(s.get(N.path)??0)>0&&f.jsx(Mo,{n:s.get(N.path)})]},N.path);if(N.file){const A=N.file,R=s.get(A.path)??0,q=o.has(A.path);return f.jsxs("div",{className:`fs-tree-row file${i===A.path?" current":""}${q?" reviewed":""}`,style:E,onClick:()=>l(A.path),title:A.oldPath?`${A.oldPath} → ${A.path}`:A.path,children:[f.jsx("input",{type:"checkbox",className:"fs-tree-check",checked:q,onClick:B=>B.stopPropagation(),onChange:B=>a(A.path,B.target.checked),"aria-label":`${A.path} を確認済みにする`,title:"確認済み"}),f.jsx(ji,{status:A.status,small:!0}),f.jsx("span",{className:"fs-tree-name",children:N.name}),R>0&&f.jsx(Mo,{n:R}),f.jsxs("span",{className:"fs-tree-counts",children:[A.additions>0&&f.jsxs("span",{className:"added",children:["+",A.additions]}),A.deletions>0&&f.jsxs("span",{className:"removed",children:["−",A.deletions]})]})]},N.path)}const O=g(N.path);return f.jsxs("div",{children:[f.jsxs("div",{className:`fs-tree-row dir${d&&S&&!S.has(N.path)?" plain":""}`,style:E,onClick:()=>w(N.path),title:N.path,children:[f.jsx("span",{className:`fs-fold small${O?" open":""}`,children:f.jsx(Md,{size:12})}),f.jsx("span",{className:"fs-tree-name",children:N.name})]}),O&&N.children.map(A=>$(A,D+1))]},N.path)};return f.jsxs("aside",{className:"fs-tree",children:[f.jsxs("div",{className:"fs-tree-head",children:[f.jsx("div",{className:"ds-seg fs-tree-mode",role:"radiogroup","aria-label":"ツリーに出すファイル",children:[["changes","変更","変更したファイルだけ"],["all","全体","リポジトリのすべてのファイル(変更していないファイルはクリックで開きます)"]].map(([N,D,E])=>f.jsx("button",{role:"radio","aria-checked":e===N,className:e===N?"on":"",onClick:()=>t(N),title:E,children:D},N))}),d?f.jsx("button",{className:"fs-icon-btn",disabled:!S,onClick:()=>{var N;return x((N=y??S)!=null&&N.size?new Set:S)},title:(k=y??S)!=null&&k.size?"すべてのフォルダを閉じる":"変更のあるフォルダを開く",children:(_=y??S)!=null&&_.size?"−":"+"}):m.length>0&&f.jsx("button",{className:"fs-icon-btn",onClick:()=>p(h.size?new Set:new Set(m)),title:h.size?"すべてのフォルダを開く":"すべてのフォルダを閉じる",children:h.size?"+":"−"}),f.jsx("input",{className:"fs-filter",type:"search",placeholder:"ファイルを絞り込む",value:u,onChange:N=>c(N.target.value)})]}),f.jsx("div",{className:"fs-tree-body",children:r?f.jsxs("div",{className:"fs-tree-empty ds-muted",children:["リポジトリのファイルを読めませんでした: ",r]}):v?v.children.length>0?v.children.map(N=>$(N,0)):f.jsx("div",{className:"fs-tree-empty ds-muted",children:u?"一致するファイルはありません":d?"ファイルはありません":"変更されたファイルはありません"}):f.jsx("div",{className:"fs-tree-empty ds-muted",children:"読み込み中…"})})]})}const Pf="fileshape.reviewed:",zc=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,zm=e=>Yt(Pf+e,{}),ZT=(e,t)=>_t(Pf+e,t),JT=e=>Ko(Pf+e),eL=e=>new Map(e.map(t=>[t.path,OE(t)]));function tL(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}const pu=300,nL={added:"A",modified:"M",removed:"D",renamed:"R"};function rL(e){const t=[e.additions||e.deletions?`+${e.additions} −${e.deletions}`:"",e.binary?"バイナリ":"",e.large?"大きいファイル":""].filter(Boolean),n=e.status==="renamed"&&e.oldPath?`${e.oldPath} → ${e.path}`:e.path;return`- ${nL[e.status]} ${n}${t.length?`(${t.join("、")})`:""}`}function iL(e){const t=e.files.filter(i=>!i.unchanged&&!i.generated),n=e.files.filter(i=>!i.unchanged&&i.generated).length,r=[`変更されたファイル(${t.length}):`,...t.slice(0,pu).map(rL)];return t.length>pu&&r.push(`- ほか ${t.length-pu} ファイル`),n&&r.push(`(生成されたファイル ${n} 個は対象外)`),r.push("","コメントの付け方:","- path: ファイルのパス(リポジトリのルートから)",'- line: 指摘する行の番号。side が "new" なら変更後のファイルの行、"old" なら変更前のファイルの行','- side: ふつうは "new"。削除された行を指すときだけ "old"',"- code: その行のコードをファイルにあるとおりに(複数行のときは改行でつなぎ、endLine に最後の行の番号。1行なら endLine は null)","- target: null",'- 変更されていないファイルの行も指せます(この変更に合わせて直すべき箇所など)。そのときも side は "new"'),r.join(`
|
|
156
|
+
`)}function Bm(e,t,n){const r=e.status==="removed"?"old":e.status==="added"||e.unchanged?"new":t.side??"new",i=ff(e,r,n);if(i.size===0)return null;const o=(t.code??"").replace(/\n+$/,"").split(`
|
|
157
|
+
`),s=t.line??1,l=c=>{let d;for(const h of i.keys())o.every((p,y)=>i.has(h+y)&&c(i.get(h+y),p))&&(d===void 0||Math.abs(h-s)<Math.abs(d-s))&&(d=h);return d},a=(c,d)=>({path:e.path,side:r,line:c,...d>1?{endLine:c+d-1}:{},code:Array.from({length:d},(h,p)=>i.get(c+p)??"").join(`
|
|
158
|
+
`)});if(o.some(c=>c.trim()!=="")){const c=l((d,h)=>d===h)??l((d,h)=>d.trim()===h.trim());if(c!==void 0)return{target:a(c,o.length),exact:!0}}if(t.line===null||!i.has(t.line))return null;let u=t.endLine!==null&&t.endLine>t.line?t.endLine-t.line+1:1;for(;u>1&&!i.has(t.line+u-1);)u--;return{target:a(t.line,u),exact:!1}}const oL=(e,t)=>e.files.find(n=>n.path===t)??e.files.find(n=>n.oldPath===t),hu="fileshape.treeWidth",mu=280,Um={};function sL({data:e,active:t,onComments:n,request:r,ai:i,onAi:o}){var Ee;const s=zc(e),[l,a]=T.useState(()=>BE(s)),u=`fileshape.opened:${s}`,[c,d]=T.useState(()=>lL(Yt(u,[])));T.useEffect(()=>_t(u,c),[u,c]);const[h,p]=T.useState(new Map),y=T.useRef(new Set),x=T.useMemo(()=>new Set(e.files.map(G=>G.path)),[e]),S=T.useMemo(()=>[...new Set([...c,...l.filter(G=>G.unchanged).map(G=>G.path)])].filter(G=>!x.has(G)),[c,l,x]);T.useEffect(()=>{for(const G of S){if(h.has(G)||y.current.has(G))continue;const re=y.current;re.add(G);const oe=be=>{y.current===re&&(re.delete(G),p(Ne=>new Map(Ne).set(G,be)))};Dh(G).then(be=>oe(be?Qa(G,be):null),()=>oe(null))}},[S,h]),T.useEffect(()=>{c.some(G=>h.get(G)===null)&&d(G=>G.filter(re=>h.get(re)!==null))},[h,c]);const v=T.useMemo(()=>S.filter(G=>h.get(G)!==null).map(G=>h.get(G)??Qa(G,void 0)),[S,h]),m=T.useMemo(()=>v.length?{...e,files:[...e.files,...v]}:e,[e,v]),g=T.useMemo(()=>new Set(l.map(G=>G.path)),[l]),w=T.useCallback(G=>d(re=>re.filter(oe=>oe!==G)),[]),$=T.useMemo(()=>Ih(m.files),[m]),k=T.useMemo(()=>Jv($),[$]),[_,N]=T.useState(()=>cc("fileshape","treeMode","changes")),D=G=>{N(G),dc("fileshape","treeMode",G)},[E,O]=T.useState(null);T.useEffect(()=>{if(_!=="all"||(E==null?void 0:E.diff)===e)return;let G=!0;return WE().then(re=>G&&O({diff:e,paths:re}),re=>G&&O({diff:e,error:re instanceof Error?re.message:String(re)})),()=>{G=!1}},[_,e,E]);const C=(E==null?void 0:E.diff)===e?E.paths:void 0,A=T.useMemo(()=>_==="changes"?$:C?Ih(m.files,C):null,[_,$,m,C]),[R,q]=T.useState(()=>cc("fileshape","mode","unified")),B=G=>{q(G),dc("fileshape","mode",G)},[V,z]=T.useState(()=>zm(s));T.useEffect(()=>z(zm(s)),[s]);const U=T.useMemo(()=>eL(e.files),[e]),b=T.useMemo(()=>tL(U,V),[U,V]),[Q,H]=T.useState({}),j=G=>{if(G in Q)return Q[G];const re=_n(m,G);return!re||!(b.has(G)||re.generated||ox(re)>Ew)},P=T.useRef(j);P.current=j;const L=T.useCallback(G=>H(re=>({...re,[G]:!P.current(G)})),[]),[F,K]=T.useState(new Map),[Z,te]=T.useState({}),[ie,de]=T.useState(0),_e=T.useRef(new Map),fe=T.useRef(!0);T.useEffect(()=>{if(fe.current){fe.current=!1;return}_e.current=new Map,K(new Map),te({}),de(G=>G+1),y.current=new Set,p(new Map)},[e]);const ye=T.useCallback(G=>{let re=_e.current.get(G);if(!re){const oe=_e.current;re=ax(G,"new").then(be=>(_e.current===oe&&K(Ne=>new Map(Ne).set(G,be)),be)),re.catch(()=>oe.delete(G)),oe.set(G,re)}return re},[]),Te=T.useCallback(async(G,re,oe)=>{const be=_n(m,G);if(!be)return;let Ne;try{Ne=await ye(G)}catch(Ie){window.alert(`ファイルを読めませんでした: ${Ie instanceof Error?Ie.message:String(Ie)}`);return}const Re=Xl(be,Ne.length)[re.index];Re&&te(Ie=>({...Ie,[G]:TE(Ie[G]??{},Re,oe,Ne.length)}))},[m,ye]),[ce,M]=T.useState({}),J=T.useCallback((G,re)=>M(oe=>({...oe,[G]:re})),[]),ee=T.useRef(new Map),he=T.useCallback((G,re)=>{re?ee.current.set(G,re):ee.current.delete(G)},[]),[ge,xe]=T.useState(null),Oe=T.useCallback((G,re)=>{const oe=U.get(G);if(oe&&(z(be=>{const Ne={...be};return re?Ne[G]=oe:delete Ne[G],ZT(s,Ne),Ne}),H(be=>({...be,[G]:!re})),re)){const be=ee.current.get(G),Ne=ge;be&&Ne&&be.getBoundingClientRect().top<Ne.getBoundingClientRect().top&&be.scrollIntoView({block:"start"})}},[U,s,ge]),[ot,X]=T.useState(null),[pe,W]=T.useState(null),ne=T.useCallback(G=>{a(G),UE(s,G)},[s]),me=T.useMemo(()=>({run:m,comments:l,contents:F,composing:ot,editing:pe,compose:G=>{X(G),W(null)},edit:G=>{W(G),X(null)},add:(G,re)=>{var oe;ne([...l,Fh(G,re,!!((oe=_n(m,G.path))!=null&&oe.unchanged))]),X(null)},update:(G,re)=>{ne(l.map(oe=>oe.id===G?{...oe,body:re}:oe)),W(null)},remove:G=>ne(l.filter(re=>re.id!==G))}),[m,l,F,ot,pe,ne]),ve=T.useMemo(()=>{const G=new Map,re=[];for(const oe of l){const be=_n(m,oe.path);if(!be){re.push(oe);continue}let Ne=G.get(oe.path);Ne||G.set(oe.path,Ne={byLine:new Map,orphans:[]});const Re=zo(be,oe,F.get(oe.path));if(Re.line===void 0)Ne.orphans.push(oe);else{const Ie=Zr(oe.side,Re.endLine??Re.line);Ne.byLine.set(Ie,[...Ne.byLine.get(Ie)??[],oe])}}return{byFile:G,gone:re}},[l,m,F]);T.useEffect(()=>{for(const G of l){const re=_n(m,G.path);re&&!Ph(re,G)&&!F.has(G.path)&&ye(G.path).catch(()=>{})}te(G=>{let re=G;for(const oe of l){const be=_n(m,oe.path),Ne=F.get(oe.path);if(!be||!Ne||Ph(be,oe))continue;const Re=zo(be,oe,Ne);if(Re.line===void 0)continue;const Ie=Re.endLine??Re.line,[pt,Jt]=oe.side==="new"?[Re.line,Ie]:[xc(be,Re.line)??Re.line,xc(be,Ie)??Ie],Be=LE(be,Ne.length,re[oe.path]??{},pt,Jt);Be!==(re[oe.path]??{})&&JSON.stringify(Be)!==JSON.stringify(re[oe.path]??{})&&(re={...re,[oe.path]:Be})}return re})},[l,F,m,ye]);const Qe=T.useMemo(()=>({byLine:new Map,orphans:[]}),[]),Ae=T.useMemo(()=>{const G=new Map;for(const re of l)G.set(re.path,(G.get(re.path)??0)+1);return G},[l]);T.useEffect(()=>{const G=l.filter(re=>DE(m,re,F.get(re.path))!=="resolved").length;n({open:G,prompt:()=>sx(m,l,{contents:F}).text,review:()=>iL(e)})},[l,m,F,e,n]);const Ke=T.useRef(l);Ke.current=l;const ft=T.useRef(0),[Ot,Zt]=T.useState(null);T.useEffect(()=>{if(!i||i.seq===ft.current)return;ft.current=i.seq;const G=i.items.filter(re=>re.module==="file");(async()=>{const re=[];for(const oe of G){if(!oe.path)continue;let be=oL(e,oe.path),Ne=!1;if(!be){const Ie=await Dh(oe.path).catch(()=>null);if(!Ie)continue;be=Qa(oe.path,Ie),Ne=!0}let Re=Bm(be,oe);if(!(Re!=null&&Re.exact)&&nx(be)){const Ie=await ye(be.path).catch(()=>{});Ie&&(Re=Bm(be,oe,Ie)??Re)}Re&&re.push({...Fh(Re.target,oe.body,Ne),ai:i.agent})}re.length&&ne([...Ke.current,...re]),Zt({seq:i.seq,placed:re.length,dropped:G.length-re.length})})()},[i,e,ye,ne]),T.useEffect(()=>{Ot&&o(Ot)},[Ot,o]);const[Ht,Tt]=T.useState(((Ee=k[0])==null?void 0:Ee.path)??null);T.useEffect(()=>{if(!ge)return;let G=0;const re=()=>{cancelAnimationFrame(G),G=requestAnimationFrame(()=>{var Ne;const oe=ge.getBoundingClientRect().top+8;let be=((Ne=k[0])==null?void 0:Ne.path)??null;for(const Re of k){const Ie=ee.current.get(Re.path);if(Ie)if(Ie.getBoundingClientRect().top<=oe)be=Re.path;else break}Tt(be)})};return ge.addEventListener("scroll",re,{passive:!0}),()=>{ge.removeEventListener("scroll",re),cancelAnimationFrame(G)}},[ge,k]);const Y=T.useRef(null),ae=(G,re)=>{var Jt;j(G)||H(Be=>({...Be,[G]:!0})),Tt(G),(Jt=Y.current)==null||Jt.stop();const oe=ge;if(!oe)return;let be=0,Ne=0;const Re=performance.now(),Ie=()=>{cancelAnimationFrame(be),oe.removeEventListener("wheel",Ie),oe.removeEventListener("touchmove",Ie),oe.removeEventListener("keydown",Ie),Y.current=null},pt=()=>{const Be=ee.current.get(G),en=re?Be==null?void 0:Be.querySelector(`[data-find="${re}"]`):null,dn=en??Be;if(dn){const St=dn.getBoundingClientRect().top-oe.getBoundingClientRect().top,fn=en?St-oe.clientHeight/3:St-(parseFloat(getComputedStyle(oe).paddingTop)||0),sa=oe.scrollTop+oe.clientHeight>=oe.scrollHeight-1,la=oe.scrollTop<=0;Math.abs(fn)>1&&!(sa&&fn>0)&&!(la&&fn<0)?(oe.scrollTop+=fn,Ne=0):(!re||en)&&Ne++}if(Ne>10||performance.now()-Re>1500)return Ie();be=requestAnimationFrame(pt)};oe.addEventListener("wheel",Ie,{passive:!0}),oe.addEventListener("touchmove",Ie,{passive:!0}),oe.addEventListener("keydown",Ie),Y.current={stop:Ie},be=requestAnimationFrame(pt)};T.useEffect(()=>()=>{var G;return(G=Y.current)==null?void 0:G.stop()},[]);const Se=G=>{m.files.some(re=>re.path===G)||d(re=>re.includes(G)?re:[...re,G]),ae(G)},Ce=T.useRef(0);T.useEffect(()=>{if(!r||!t||!ge||r.seq===Ce.current)return;Ce.current=r.seq;const G=k.find(re=>re.path===r.target)??k.find(re=>re.oldPath===r.target);Se(G?G.path:r.target)});const je=Xd(t),Pe=T.useMemo(()=>{const G=[];if(!je.open||!je.query)return G;const re=(oe,be,Ne)=>{Qd(Ne,je.query,je.caseSensitive,Br-G.length).forEach((Re,Ie)=>G.push({path:oe,key:be,nth:Ie}))};for(const oe of k){re(oe.path,null,oe.oldPath?`${oe.oldPath} → ${oe.path}`:oe.path);for(const be of rx(oe,F.get(oe.path),Z[oe.path]??Um)){if(G.length>=Br)return G;if(be.kind!=="line")continue;const Ne=be.line;re(oe.path,Ne.type==="delete"?`old:${Ne.oldLine}`:`new:${Ne.newLine}`,Ne.content)}}return G},[k,F,Z,je.open,je.query,je.caseSensitive]),nt=Pe[ql(je,Pe.length)]??null;T.useEffect(()=>{!je.open||!nt||(nt.key&&ce[nt.path]==="preview"&&J(nt.path,"diff"),ae(nt.path,nt.key??void 0))},[je.seq]),Jd({root:ge,selector:".fs-code, .fs-file-path",find:je,on:t,current:()=>{if(!nt)return null;const G=ee.current.get(nt.path),re=G==null?void 0:G.querySelector(nt.key?`[data-find="${nt.key}"]`:".fs-file-path");return re?{el:re,nth:nt.nth}:null}});const[Et,ut]=T.useState(()=>Yt(hu,mu)),I=T.useRef(null),se=ME(e.files),ke=PE(e.files);return f.jsx(cx.Provider,{value:me,children:f.jsxs("div",{className:"fs-app",ref:I,style:{gridTemplateColumns:`${Et}px ${zr}px minmax(0, 1fr)`},"data-active":t||void 0,children:[f.jsxs(Vd,{children:[f.jsxs(qd,{children:[f.jsx(_i,{children:"ファイル"}),f.jsx(Wd,{stats:se,unit:"ファイル",showZero:!0}),f.jsx(Kd,{}),f.jsx(_i,{children:"行"}),f.jsx(Oi,{stats:ke,title:`追加 ${ke.added} 行・削除 ${ke.removed} 行`,showZero:!0})]}),f.jsx(Gd,{}),f.jsx(Zd,{find:je,count:Pe.length,placeholder:"ファイル名・コードを検索"}),f.jsx(Yd,{done:b.size,total:U.size,title:"確認済みにしたファイル(そのファイルがまた変わると外れます)"}),f.jsx("div",{className:"ds-seg",role:"radiogroup","aria-label":"表示",children:[["unified","Unified"],["split","Split"]].map(([G,re])=>f.jsx("button",{role:"radio","aria-checked":R===G,className:R===G?"on":"",onClick:()=>B(G),children:re},G))})]}),f.jsx(QT,{mode:_,onMode:D,tree:A,error:_==="all"&&(E==null?void 0:E.diff)===e?E.error??null:null,current:Ht,reviewed:b,commentCounts:Ae,onSelect:Se,onReviewed:Oe}),f.jsx(Oo,{title:"ドラッグで幅を変更(ダブルクリックで戻す)",start:()=>Et,onDrag:(G,re)=>{var oe;return ut(Math.max(160,Math.min(G+re,(((oe=I.current)==null?void 0:oe.clientWidth)??1200)-320)))},onEnd:()=>_t(hu,Et),onReset:()=>{ut(mu),_t(hu,mu)}}),f.jsxs("main",{className:"fs-main",ref:xe,children:[ve.gone.length>0&&f.jsxs("div",{className:"fs-orphans top",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなったファイルへのコメント"}),ve.gone.map(G=>f.jsx(mf,{c:G,showWhere:!0},G.id))]}),k.length===0&&f.jsx("div",{className:"fs-empty",children:"変更されたファイルはありません"}),k.map(G=>{var oe;const re=ve.byFile.get(G.path)??Qe;return f.jsx(KT,{file:G,mode:R,open:j(G.path),reviewed:b.has(G.path),content:F.get(G.path),expansion:Z[G.path]??Um,view:ce[G.path]??((oe=Sw(G))==null?void 0:oe.first)??"diff",version:ie,byLine:re.byLine,orphans:re.orphans,commentCount:Ae.get(G.path)??0,scrollRoot:ge,onToggle:L,onReviewed:Oe,onExpand:Te,onView:J,register:he,onClose:G.unchanged&&!g.has(G.path)?w:void 0},G.path)})]})]})})}const lL=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[],aL={id:"file",title:"ファイル",heading:"ファイルの差分",description:"ファイルの差分(fileshape): 変更された各ファイルの行の差分",icon:Od,View:sL,badge:e=>e.files.length||void 0,clearReview:e=>{HE(zc(e)),JT(zc(e))}},Cw=[aL,_E,O1],Hm="diffshape.cleaned";function uL(e){if(!(!e.clean||Yt(Hm,"")===e.clean)){for(const t of Cw)e.modules.includes(t.id)&&t.clearReview(e);_t(Hm,e.clean)}}async function Wm(e){const t=await fetch(e);if(!t.ok)throw new Error(await t.text());return await t.json()}function gu(){const e=window.location.hash.replace(/^#\/?/,""),t=e.indexOf("/");if(t<0)return{module:e,target:null};let n;try{n=decodeURIComponent(e.slice(t+1))}catch{n=e.slice(t+1)}return{module:e.slice(0,t),target:n||null}}const cL=(e,t)=>`${e}/${t.split("/").map(encodeURIComponent).join("/")}`;function dL(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[i,o]=T.useState({}),[s,l]=T.useState(!1),[a,u]=T.useState(()=>gu().module),[c,d]=T.useState(()=>{const H=gu();return H.target?{[H.module]:{target:H.target,seq:1}}:{}}),[h,p]=T.useState({}),[y,x]=T.useState(null),S=T.useMemo(()=>e?Cw.filter(H=>e.modules.includes(H.id)):[],[e]),v=T.useCallback(async H=>{try{const j=await Wm(`/api/info${H?"?refresh=1":""}`);uL(j),t(j),r(null),o(P=>Object.fromEntries(j.modules.map(L=>{var F;return[L,((F=P[L])==null?void 0:F.state)==="ready"?P[L]:{state:"loading"}]}))),await Promise.all(j.modules.map(async P=>{let L;try{const F=await Wm(`/api/module/${P}`);L="error"in F?{state:"error",error:F.error}:{state:"ready",data:F.data}}catch(F){L={state:"error",error:F instanceof Error?F.message:String(F)}}o(F=>({...F,[P]:L}))}))}catch(j){r(j instanceof Error?j.message:String(j))}},[]);T.useEffect(()=>{v(!1)},[v]);const m=T.useCallback(()=>{const H=gu();if(u(H.module),H.target){const j=H.target;d(P=>{var L;return{...P,[H.module]:{target:j,seq:(((L=P[H.module])==null?void 0:L.seq)??0)+1}}})}},[]);T.useEffect(()=>(window.addEventListener("hashchange",m),()=>window.removeEventListener("hashchange",m)),[m]);const g=S.find(H=>H.id===a)??S[0],w=H=>{window.location.hash=H,u(H)},$=T.useCallback((H,j)=>{const P=cL(H,j);window.location.hash.replace(/^#\/?/,"")===P?m():window.location.hash=P},[m]),k=T.useMemo(()=>S.map(H=>H.id),[S]),_=T.useRef(new Map),N=H=>{let j=_.current.get(H);return j||_.current.set(H,j=P=>p(L=>({...L,[H]:P}))),j},D=T.useCallback(async()=>{l(!0),await v(!0),l(!1)},[v]),E=T.useCallback(H=>{x(H),window.setTimeout(()=>x(j=>j===H?null:j),4e3)},[]),[O,C]=T.useState(null),[A,R]=T.useState({}),q=T.useRef(new Map),B=H=>{let j=q.current.get(H);return j||q.current.set(H,j=P=>R(L=>({...L,[H]:P}))),j},[V,z]=T.useState(!1),U=S.filter(H=>{var j;return(((j=h[H.id])==null?void 0:j.open)??0)>0}),b=U.reduce((H,j)=>H+h[j.id].open,0),Q=async()=>{!e||b===0||(await Ai(cv(e,U.map(H=>({id:H.id,heading:H.heading,comments:h[H.id].prompt()})))),E(`${b} 件をコピーしました`))};return n?f.jsxs("div",{className:"shell-message",children:["読み込めませんでした: ",n]}):!e||!g?f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}):f.jsxs("div",{className:`shell ${S.length>1?"with-rail":""}`,children:[S.length>1&&f.jsx("nav",{className:"rail","aria-label":"モジュール",children:S.map(H=>{var j;return f.jsx(fL,{module:H,loaded:i[H.id],active:H===g,comments:((j=h[H.id])==null?void 0:j.open)??0,onClick:()=>w(H.id)},H.id)})}),f.jsxs("header",{className:"shell-head",children:[f.jsx("span",{className:"shell-brand",children:"diffshape"}),S.length===1&&f.jsx("span",{className:"shell-module",children:g.title}),f.jsxs("span",{className:"shell-compare",title:`${e.repoRoot}
|
|
159
|
+
${e.baseLabel} → ${e.targetLabel}`,children:[f.jsx("span",{className:"ds-ref",children:e.baseLabel}),f.jsx("span",{className:"shell-muted",children:"→"}),f.jsx("span",{className:"ds-ref",children:e.targetLabel})]}),f.jsx("span",{className:"shell-spacer"}),y&&f.jsx("span",{className:"shell-note",children:y}),f.jsxs("button",{className:"ds-btn ds-btn-note",onClick:()=>void Q(),disabled:b===0,title:b?`未対応のコメント(${U.map(H=>`${H.title} ${h[H.id].open}`).join("、")})を AI に貼れる形でコピー(場所と本文だけ)`:"未対応のコメントはありません",children:[f.jsx(sv,{size:13}),"AI 用にコピー",b>0?`(${b})`:""]}),f.jsx(hb,{info:e,modules:S,current:g,reports:h,acks:A,onBatch:C,onReload:D,onFixing:z,flash:E}),f.jsxs("button",{className:"ds-btn",onClick:()=>void D(),disabled:s||V,title:V?"AI が修正しています(終わると自動で読み直します)":"リポジトリを読み直して比較し直す",children:[f.jsx(eb,{size:13,className:s?"shell-spin":void 0}),s?"解析中…":"再読み込み"]})]}),f.jsx("main",{className:"shell-body",children:S.map(H=>{const j=i[H.id]??{state:"loading"},P=H===g;return f.jsxs("section",{className:"shell-module-root","data-module":H.id,hidden:!P,children:[j.state==="loading"&&f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}),j.state==="error"&&f.jsxs("div",{className:"shell-message",children:[f.jsx("p",{children:H.description}),f.jsx("p",{className:"shell-error",children:j.error})]}),j.state==="ready"&&f.jsx(H.View,{data:j.data,active:P,onComments:N(H.id),modules:k,openIn:$,request:c[H.id]??null,ai:O,onAi:B(H.id)},`${e.targetLabel}|${e.baseLabel}`)]},H.id)})})]})}function fL({module:e,loaded:t,active:n,comments:r,onClick:i}){var l;const o=(t==null?void 0:t.state)==="ready"?(l=e.badge)==null?void 0:l.call(e,t.data):void 0,s=e.icon;return f.jsxs("button",{className:`rail-btn ${n?"on":""} ${(t==null?void 0:t.state)==="error"?"unavailable":""}`,onClick:i,title:`${e.description}${o?`
|
|
160
|
+
変更 ${o}`:""}${r?`
|
|
161
|
+
未対応のコメント ${r}`:""}`,"aria-label":e.title,"aria-current":n?"page":void 0,children:[f.jsx(s,{size:20}),f.jsx("span",{className:"rail-label",children:e.title}),o!==void 0&&f.jsx("span",{className:"rail-badge",children:o>99?"99+":o}),r>0&&f.jsx("span",{className:"rail-dot"})]})}iv(document.getElementById("root")).render(f.jsx(T.StrictMode,{children:f.jsx(dL,{})}));
|